mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
avcodec/v4l2_m2m_enc: add support for -force_key_frames
Signed-off-by: Aman Gupta <aman@tmm1.net>
This commit is contained in:
parent
0f0f5188ac
commit
ab4835f418
@ -245,6 +245,9 @@ static int v4l2_send_frame(AVCodecContext *avctx, const AVFrame *frame)
|
||||
V4L2m2mContext *s = ((V4L2m2mPriv*)avctx->priv_data)->context;
|
||||
V4L2Context *const output = &s->output;
|
||||
|
||||
if (frame && frame->pict_type == AV_PICTURE_TYPE_I)
|
||||
v4l2_set_ext_ctrl(s, MPEG_CID(FORCE_KEY_FRAME), 0, "force key frame");
|
||||
|
||||
return ff_v4l2_context_enqueue_frame(output, frame);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user