Commit 0aaaca25 authored by Zhong Li's avatar Zhong Li

lavc/qsvenc: set pict_type to be I for IDR frames.

Signed-off-by: 's avatarZhong Li <zhong.li@intel.com>
parent e92ce340
...@@ -1341,11 +1341,10 @@ int ff_qsv_encode(AVCodecContext *avctx, QSVEncContext *q, ...@@ -1341,11 +1341,10 @@ int ff_qsv_encode(AVCodecContext *avctx, QSVEncContext *q,
new_pkt.pts = av_rescale_q(bs->TimeStamp, (AVRational){1, 90000}, avctx->time_base); new_pkt.pts = av_rescale_q(bs->TimeStamp, (AVRational){1, 90000}, avctx->time_base);
new_pkt.size = bs->DataLength; new_pkt.size = bs->DataLength;
if (bs->FrameType & MFX_FRAMETYPE_IDR || if (bs->FrameType & MFX_FRAMETYPE_IDR || bs->FrameType & MFX_FRAMETYPE_xIDR) {
bs->FrameType & MFX_FRAMETYPE_xIDR)
new_pkt.flags |= AV_PKT_FLAG_KEY; new_pkt.flags |= AV_PKT_FLAG_KEY;
pict_type = AV_PICTURE_TYPE_I;
if (bs->FrameType & MFX_FRAMETYPE_I || bs->FrameType & MFX_FRAMETYPE_xI) } else if (bs->FrameType & MFX_FRAMETYPE_I || bs->FrameType & MFX_FRAMETYPE_xI)
pict_type = AV_PICTURE_TYPE_I; pict_type = AV_PICTURE_TYPE_I;
else if (bs->FrameType & MFX_FRAMETYPE_P || bs->FrameType & MFX_FRAMETYPE_xP) else if (bs->FrameType & MFX_FRAMETYPE_P || bs->FrameType & MFX_FRAMETYPE_xP)
pict_type = AV_PICTURE_TYPE_P; pict_type = AV_PICTURE_TYPE_P;
......
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