Commit e6b1c3bb authored by Anton Khirnov's avatar Anton Khirnov
Browse files

pthread: make ff_thread_release_buffer idempotent.

I.e. don't do anything on already released frames.
parent 729b3714
......@@ -975,6 +975,9 @@ void ff_thread_release_buffer(AVCodecContext *avctx, AVFrame *f)
PerThreadContext *p = avctx->thread_opaque;
FrameThreadContext *fctx;
if (!f->data[0])
if (!(avctx->active_thread_type&FF_THREAD_FRAME)) {
avctx->release_buffer(avctx, f);
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