pthread: set the frame properties from the thread context, not user.

Right now, the frame properties are set from the user-facing
AVCodecContext before it is updated from the thread context, which is
wrong since they may be invalid or obsolete.
This commit is contained in:
Anton Khirnov 2013-01-24 11:45:27 +01:00
parent 1076ea8115
commit a4c9260e69

View File

@ -631,10 +631,10 @@ 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;
picture->sample_aspect_ratio = p->avctx->sample_aspect_ratio;
picture->width = p->avctx->width;
picture->height = p->avctx->height;
picture->format = p->avctx->pix_fmt;
/*
* A later call with avkpt->size == 0 may loop over all threads,