diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-03-04 02:47:12 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-03-04 02:47:12 +0100 |
commit | ec6d043f8e5842389b58e0a62cf952b14a5a16fc (patch) | |
tree | b606258b2b55310f52de347c87be1c6cb6354a23 | |
parent | b416517cce6b05bcdd838b8f34a0050e729beec2 (diff) | |
download | ffmpeg-ec6d043f8e5842389b58e0a62cf952b14a5a16fc.tar.gz |
avcodec/h263dec: Workaround H263 end padding bug
Fixes: H263PaddingBugFixVID_6647.MOV
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/h263dec.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index 6324e9be87..8fb3d38633 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -319,6 +319,17 @@ static int decode_slice(MpegEncContext *s) } } + if (s->codec_id == AV_CODEC_ID_H263 && + (s->workaround_bugs & FF_BUG_AUTODETECT) && + get_bits_left(&s->gb) >= 8 && + get_bits_left(&s->gb) < 300 && + s->pict_type == AV_PICTURE_TYPE_I && + show_bits(&s->gb, 8) == 0 && + !s->data_partitioning) { + + s->padding_bug_score += 32; + } + if (s->workaround_bugs & FF_BUG_AUTODETECT) { if (s->padding_bug_score > -2 && !s->data_partitioning) s->workaround_bugs |= FF_BUG_NO_PADDING; |