avcodec/h264_slice: assert that reinit does not occur after the first slice
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 7 Feb 2015 02:45:14 +0000 (03:45 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 12 Feb 2015 16:10:36 +0000 (17:10 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 2fd9ce92af43e6dcbc8ed7c26c00b052de48ccad)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/h264_slice.c

index aedfa3e..f03ab4e 100644 (file)
@@ -1480,6 +1480,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)