summaryrefslogtreecommitdiff
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index e39a119364..6fd238d444 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -950,8 +950,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)
@@ -1618,6 +1622,7 @@ static int h264_decode_frame(AVCodecContext *avctx, void *data,
int ret;
h->flags = avctx->flags;
+ h->setup_finished = 0;
/* end of stream, output what is still in the buffers */
out: