Fixes issue 2373. Originally committed as revision 25875 to svn://svn.ffmpeg.org/ffmpeg/trunk
Unified · Split
| @@ -261,6 +261,13 @@ static int decode_slice(MpegEncContext *s){ · 260 unmodified lines | ||
| 261 | 261 | |
| 262 | 262 | assert(s->mb_x==0 && s->mb_y==s->mb_height); |
| 263 | 263 | |
| 264 | + if(s->codec_id==CODEC_ID_MPEG4 | |
| 265 | + && (s->workaround_bugs&FF_BUG_AUTODETECT) | |
| 266 | + && get_bits_left(&s->gb) >= 48 | |
| 267 | + && show_bits(&s->gb, 24)==0x4010 | |
| 268 | + && !s->data_partitioning) | |
| 269 | + s->padding_bug_score+=32; | |
| 270 | + | |
| 264 | 271 | /* try to detect the padding bug */ |
| 265 | 272 | if( s->codec_id==CODEC_ID_MPEG4 |
| 266 | 273 | && (s->workaround_bugs&FF_BUG_AUTODETECT) |