h264: Make sure reinit failures mark the context as not initialized
[ffmpeg.git] / libavcodec / h264.c
index c41cc36..dac1ca5 100644 (file)
@@ -3389,7 +3389,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
          h->height != h->avctx->coded_height  ||
          must_reinit ||
          needs_reinit)) {
-
+        h->context_initialized = 0;
         if (h != h0) {
             av_log(h->avctx, AV_LOG_ERROR, "changing width/height on "
                    "slice %d\n", h0->current_slice + 1);