summaryrefslogtreecommitdiff
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-06-27 21:44:08 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-06-27 22:15:01 +0200
commitbd5c6a519e9bb36256cbcc188b6c9721760f2290 (patch)
tree41c869d150ec56ee7078f563bc9adee51fc95e97 /libavcodec/h264.c
parent77412f0ecd23bdf75290c7f002ee7b7d249f7883 (diff)
parent5ec0bdf2c524224f30ba4786f47324970aed4aaa (diff)
Merge commit '5ec0bdf2c524224f30ba4786f47324970aed4aaa'
* commit '5ec0bdf2c524224f30ba4786f47324970aed4aaa': h264: do not update the context fields copied between threads after finish_setup() Conflicts: libavcodec/h264.h libavcodec/h264_slice.c See: f111831ed61103f9fa8fdda41473a23da016bdaa and others Merged-by: Michael Niedermayer <michaelni@gmx.at>
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 1cbd4cbee8..818ee06803 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -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;