diff options
Diffstat (limited to 'libavcodec/pthread.c')
-rw-r--r-- | libavcodec/pthread.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c index d8f8858c1e..e155f73680 100644 --- a/libavcodec/pthread.c +++ b/libavcodec/pthread.c @@ -646,10 +646,6 @@ int ff_thread_decode_frame(AVCodecContext *avctx, *picture = p->frame; *got_picture_ptr = p->got_frame; picture->pkt_dts = p->avpkt.dts; - picture->sample_aspect_ratio = avctx->sample_aspect_ratio; - picture->width = avctx->width; - picture->height = avctx->height; - picture->format = avctx->pix_fmt; /* * A later call with avkpt->size == 0 may loop over all threads, @@ -995,6 +991,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; |