aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-10-03 12:32:21 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-10-05 14:20:32 +0200
commit8acfae6901111a9ba93f51fff727fb84bf93fc3c (patch)
tree184c6c4e325f73424d46aaad44c27e83d68c86e2
parente5ccd894d1c1c07c39876b650b2993de16547fb0 (diff)
downloadffmpeg-8acfae6901111a9ba93f51fff727fb84bf93fc3c.tar.gz
avcodec/h263dec: Fix decoding messenger.h263
Fixes http://samples.mplayerhq.hu/V-codecs/h263/h263-raw/messenger.h263 Fixes regression since b239f3f6 Found-by: Josh Allmann Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit d225b0f7aaa65eafccc87165130e1c4bab71708b) Conflicts: libavcodec/h263dec.c Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/h263dec.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index 6324e9be87..3e8bc84f37 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -319,6 +319,14 @@ 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) >= 64 &&
+ AV_RB64(s->gb.buffer_end - 8) == 0xCDCDCDCDFC7F0000) {
+
+ 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;