summaryrefslogtreecommitdiff
path: root/libavcodec/h264dec.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2016-07-20 09:41:35 +0200
committerAnton Khirnov <anton@khirnov.net>2016-07-20 16:36:10 +0200
commite344e65109f1a75ca82aff4cecec44e79197753c (patch)
tree3c46394a1af00116a207067f7a8b70c846621fb5 /libavcodec/h264dec.c
parent76f7e70aa04fc5dbef5242b11cbf8fe4499f61d4 (diff)
h264dec: do not call finish_setup() if we have not started a frame
Found-By: Jan Ruge <jan.s.ruge@gmail.com> Bug-Id: 952
Diffstat (limited to 'libavcodec/h264dec.c')
-rw-r--r--libavcodec/h264dec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c
index 4d1702e114..0e318a50b1 100644
--- a/libavcodec/h264dec.c
+++ b/libavcodec/h264dec.c
@@ -557,7 +557,7 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size)
break;
if (avctx->active_thread_type & FF_THREAD_FRAME && !h->avctx->hwaccel &&
- i >= nals_needed && !h->setup_finished) {
+ i >= nals_needed && !h->setup_finished && h->cur_pic_ptr) {
ff_thread_finish_setup(avctx);
h->setup_finished = 1;
}