From 2fd9ce92af43e6dcbc8ed7c26c00b052de48ccad Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 7 Feb 2015 03:45:14 +0100 Subject: [PATCH] avcodec/h264_slice: assert that reinit does not occur after the first slice Signed-off-by: Michael Niedermayer --- libavcodec/h264_slice.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c index 8c3b9f354c..05a6ccfa07 100644 --- a/libavcodec/h264_slice.c +++ b/libavcodec/h264_slice.c @@ -1459,6 +1459,8 @@ int ff_h264_decode_slice_header(H264Context *h, H264Context *h0) return AVERROR_INVALIDDATA; } + av_assert1(first_slice); + ff_h264_flush_change(h); if ((ret = get_pixel_format(h, 1)) < 0)