]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/h264.c
avcodec/jpeg2000: Support 32 decomposition levels
[ffmpeg] / libavcodec / h264.c
index 1cbd4cbee87e8e4064598748380f1b590ec63345..818ee0680335f92747380d466a9ece431b1d5b64 100644 (file)
@@ -974,8 +974,12 @@ static void decode_postinit(H264Context *h, int setup_finished)
         h->next_output_pic->recovered |= !!(h->frame_recovered & FRAME_RECOVERED_SEI);
     }
 
-    if (setup_finished && !h->avctx->hwaccel)
+    if (setup_finished && !h->avctx->hwaccel) {
         ff_thread_finish_setup(h->avctx);
+
+        if (h->avctx->active_thread_type & FF_THREAD_FRAME)
+            h->setup_finished = 1;
+    }
 }
 
 int ff_pred_weight_table(H264Context *h, H264SliceContext *sl)
@@ -1746,6 +1750,7 @@ static int h264_decode_frame(AVCodecContext *avctx, void *data,
     int ret;
 
     h->flags = avctx->flags;
+    h->setup_finished = 0;
 
     if (h->backup_width != -1) {
         avctx->width    = h->backup_width;