Merge commit 'e26c64148be8a20ace7512d96503172fb5e9753b'
[ffmpeg.git] / libavcodec / h264_slice.c
index c2490cbd45bb187fa5356dd5cfaed295600bf32e..c6f40e59c599f90016edfab5ebe7e4495e2b188d 100644 (file)
@@ -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");