aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortralph11@yahoo.com <tralph11@yahoo.com>2009-10-20 15:27:05 +0000
committerCarl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at>2009-10-20 15:27:05 +0000
commit711e69a730904a341652d4999a1d1402bcbb7b6e (patch)
treea03ee1ce88a9fe0437c9d06b611637773ba0e79b
parent558dbb846983441d732b49934e8dc44d28f5300a (diff)
downloadffmpeg-711e69a730904a341652d4999a1d1402bcbb7b6e.tar.gz
Improve sofdec dectection to avoid false positives for MP2.
Patch by tralph11, tralph11 yahoo Originally committed as revision 20333 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/mpeg.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index 8aa43d9448..ad4646786f 100644
--- a/libavformat/mpeg.c
+++ b/libavformat/mpeg.c
@@ -113,6 +113,8 @@ static int mpegps_read_header(AVFormatContext *s,
m->sofdec++;
} while (v == sofdec[i] && i++ < 6);
+ m->sofdec = (m->sofdec == 6) ? 1 : 0;
+
/* no need to do more */
return 0;
}