aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2010-12-04 05:44:18 +0000
committerMichael Niedermayer <michaelni@gmx.at>2010-12-04 05:44:18 +0000
commitdf59c9c0f85bd46170f2fc6977699c4e6d877977 (patch)
tree9ccc241b529dd2a65de2ff098822a9f0d90b4381
parent1ef64490e1c7b682eeca545ce5ded77733cfbf10 (diff)
downloadffmpeg-df59c9c0f85bd46170f2fc6977699c4e6d877977.tar.gz
Detect incorrect padding with wrong stuffing codes used by NEC N-02B.
I dont know if this is the best way to handle it. But it fixes http://kuwatan.jp/temp/n-02b.3gp Fixes issue 2373. Originally committed as revision 25875 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/h263dec.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index b0a3a8a7fe..04417c256d 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -261,6 +261,13 @@ static int decode_slice(MpegEncContext *s){
assert(s->mb_x==0 && s->mb_y==s->mb_height);
+ if(s->codec_id==CODEC_ID_MPEG4
+ && (s->workaround_bugs&FF_BUG_AUTODETECT)
+ && get_bits_left(&s->gb) >= 48
+ && show_bits(&s->gb, 24)==0x4010
+ && !s->data_partitioning)
+ s->padding_bug_score+=32;
+
/* try to detect the padding bug */
if( s->codec_id==CODEC_ID_MPEG4
&& (s->workaround_bugs&FF_BUG_AUTODETECT)