diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c index 6a80d894e1..8a335538a1 100644 --- a/libavcodec/h264_slice.c +++ b/libavcodec/h264_slice.c @@ -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,