Commit 1f7b4f9a authored by Anton Khirnov's avatar Anton Khirnov

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.
parent da917fcf
...@@ -550,7 +550,7 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size) ...@@ -550,7 +550,7 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size)
break; break;
if (avctx->active_thread_type & FF_THREAD_FRAME && !h->avctx->hwaccel && 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); ff_thread_finish_setup(avctx);
h->setup_finished = 1; h->setup_finished = 1;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment