avcodec/h264_slice: assert relation between current_slice ans slice_ctx
authorMichael Niedermayer <michael@niedermayer.cc>
Fri, 12 Feb 2016 02:40:19 +0000 (03:40 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Fri, 12 Feb 2016 03:37:35 +0000 (04:37 +0100)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/h264_slice.c

index 6a80d89..8a33553 100644 (file)
@@ -1212,6 +1212,9 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl)
         }
     }
 
+    if (!h->current_slice)
+        av_assert0(sl == h->slice_ctx);
+
     slice_type = get_ue_golomb_31(&sl->gb);
     if (slice_type > 9) {
         av_log(h->avctx, AV_LOG_ERROR,