summaryrefslogtreecommitdiff
path: root/libavcodec/h264_slice.c
diff options
context:
space:
mode:
authorTimothy Gu <timothygu99@gmail.com>2016-08-03 19:46:06 -0700
committerTimothy Gu <timothygu99@gmail.com>2016-08-03 19:50:06 -0700
commitde625312862a99500ce7aa1703b5d783ae66d704 (patch)
tree0590e6448b83540302ca747e80d3ee7309a088c4 /libavcodec/h264_slice.c
parente0c8250a59adbf7135adb870be275df05a61e052 (diff)
parente26c64148be8a20ace7512d96503172fb5e9753b (diff)
Merge commit 'e26c64148be8a20ace7512d96503172fb5e9753b'
* commit 'e26c64148be8a20ace7512d96503172fb5e9753b': h264: discard slices of redundant pictures right after parsing the slice header Conflicts: libavcodec/h264_slice.c libavcodec/h264dec.c TODO: fix indentation Merged-by: Timothy Gu <timothygu99@gmail.com>
Diffstat (limited to 'libavcodec/h264_slice.c')
-rw-r--r--libavcodec/h264_slice.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index c2490cbd45..c6f40e59c5 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -1738,6 +1738,10 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl,
if (ret < 0)
return ret;
+ // discard redundant pictures
+ if (sl->redundant_pic_count > 0)
+ return 0;
+
if (sl->first_mb_addr == 0 || !h->current_slice) {
if (h->setup_finished) {
av_log(h->avctx, AV_LOG_ERROR, "Too many fields\n");