diff options
author | James Almer <jamrial@gmail.com> | 2018-04-14 02:38:46 +0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2018-04-14 02:38:46 +0300 |
commit | bbe95ebdadff24127a7c1c9ccf1e7b71aac96cf8 (patch) | |
tree | 4caa8824e6a12601ffe4a520ddb76124594831d1 /libavcodec/qsvdec.c | |
parent | f790410b6baa4ee53e8a5796e986de0cae78b073 (diff) | |
parent | 54307b35311e9a871b3d8ecb2b2eecfc16de0163 (diff) |
Merge commit '54307b35311e9a871b3d8ecb2b2eecfc16de0163'
* commit '54307b35311e9a871b3d8ecb2b2eecfc16de0163':
lavc/qsvdec: set complete_frame flags for progressive picture
Merged-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/qsvdec.c')
-rw-r--r-- | libavcodec/qsvdec.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c index 80e1e645eb..32f1fe79d7 100644 --- a/libavcodec/qsvdec.c +++ b/libavcodec/qsvdec.c @@ -323,6 +323,8 @@ static int qsv_decode(AVCodecContext *avctx, QSVContext *q, bs.DataLength = avpkt->size; bs.MaxLength = bs.DataLength; bs.TimeStamp = avpkt->pts; + if (avctx->field_order == AV_FIELD_PROGRESSIVE) + bs.DataFlag |= MFX_BITSTREAM_COMPLETE_FRAME; } sync = av_mallocz(sizeof(*sync)); @@ -506,6 +508,7 @@ int ff_qsv_process_data(AVCodecContext *avctx, QSVContext *q, pkt->data, pkt->size, pkt->pts, pkt->dts, pkt->pos); + avctx->field_order = q->parser->field_order; /* TODO: flush delayed frames on reinit */ if (q->parser->format != q->orig_pix_fmt || FFALIGN(q->parser->coded_width, 16) != FFALIGN(avctx->coded_width, 16) || @@ -530,7 +533,6 @@ int ff_qsv_process_data(AVCodecContext *avctx, QSVContext *q, avctx->height = q->parser->height; avctx->coded_width = FFALIGN(q->parser->coded_width, 16); avctx->coded_height = FFALIGN(q->parser->coded_height, 16); - avctx->field_order = q->parser->field_order; avctx->level = q->avctx_internal->level; avctx->profile = q->avctx_internal->profile; |