Browse Source

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
tags/n0.8
Michael Niedermayer 15 years ago
parent
commit
df59c9c0f8
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      libavcodec/h263dec.c

+ 7
- 0
libavcodec/h263dec.c View File

@@ -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)


Loading…
Cancel
Save