summaryrefslogtreecommitdiff
path: root/libavcodec/pthread.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/pthread.c')
-rw-r--r--libavcodec/pthread.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c
index bbbc4829ec..2a11195e78 100644
--- a/libavcodec/pthread.c
+++ b/libavcodec/pthread.c
@@ -951,6 +951,10 @@ int ff_thread_get_buffer(AVCodecContext *avctx, AVFrame *f)
ff_thread_finish_setup(avctx);
}
+ if (err) {
+ free_progress(f);
+ f->thread_opaque = NULL;
+ }
pthread_mutex_unlock(&p->parent->buffer_mutex);
return err;