diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2018-08-19 10:15:53 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2018-10-07 21:34:00 +0200 |
commit | ce828a247d5f6ae6cbb416dcdc56321be820ba4d (patch) | |
tree | 2a242ca244793725f15f1946ca47e47ef272d57d | |
parent | 6e60a38322d18be3464cfd81cf47b04b9b620d71 (diff) | |
download | ffmpeg-ce828a247d5f6ae6cbb416dcdc56321be820ba4d.tar.gz |
avcodec/mpeg4videodec: Fix slice end detection in mpeg4_decode_studio_mb()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 168d8d56bfb0c69684637f3d04889db647de6238)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/mpeg4videodec.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c index 24c280df46..1686ed1001 100644 --- a/libavcodec/mpeg4videodec.c +++ b/libavcodec/mpeg4videodec.c @@ -1955,6 +1955,14 @@ static int mpeg4_decode_studio_mb(MpegEncContext *s, int16_t block_[12][64]) return SLICE_END; } + //vcon-stp9L1.bits (first frame) + if (get_bits_left(&s->gb) == 0) + return SLICE_END; + + //vcon-stp2L1.bits, vcon-stp3L1.bits, vcon-stp6L1.bits, vcon-stp7L1.bits, vcon-stp8L1.bits, vcon-stp10L1.bits (first frame) + if (get_bits_left(&s->gb) < 8U && show_bits(&s->gb, get_bits_left(&s->gb)) == 0) + return SLICE_END; + return SLICE_OK; } |