summaryrefslogtreecommitdiff
path: root/libavcodec/h264dec.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2016-07-20 09:59:45 +0200
committerAnton Khirnov <anton@khirnov.net>2016-07-20 16:35:49 +0200
commit1f7b4f9abc6bae94e576e710b8d10117ca3c8238 (patch)
tree7ed5e487a34ce0847b3b36ab2dd69a23f2a60e4e /libavcodec/h264dec.c
parentda917fcf5183ed249ad1285b8edd330f421376c4 (diff)
h264dec: make sure not to call finish_setup() more than once per frame
It does not break anything currently, but should not be done anyway.
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 1086eab8d3..faa502ed09 100644
--- a/libavcodec/h264dec.c
+++ b/libavcodec/h264dec.c
@@ -550,7 +550,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) {
+ i >= nals_needed && !h->setup_finished) {
ff_thread_finish_setup(avctx);
h->setup_finished = 1;
}