mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-29 06:45:47 +00:00
lavc/qsvenc: respect user's setting for keyframes
For example: ./ffmpeg -hwaccel qsv -i input.mp4 -force_key_frames:v source -c:v hevc_qsv -f null - Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
This commit is contained in:
parent
dbdd9ccded
commit
c872ba5899
@ -2482,7 +2482,7 @@ static int encode_frame(AVCodecContext *avctx, QSVEncContext *q,
|
||||
|
||||
if (frame->pict_type == AV_PICTURE_TYPE_I) {
|
||||
enc_ctrl->FrameType = MFX_FRAMETYPE_I | MFX_FRAMETYPE_REF;
|
||||
if (q->forced_idr)
|
||||
if ((frame->flags & AV_FRAME_FLAG_KEY) || q->forced_idr)
|
||||
enc_ctrl->FrameType |= MFX_FRAMETYPE_IDR;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user