Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAman Gupta <aman@tmm1.net>2019-08-23 01:04:48 +0300
committerAman Gupta <aman@tmm1.net>2019-09-11 04:52:37 +0300
commitab4835f41885c0f2e2f75101d72b888557c0e284 (patch)
treecedf8287aa5765c9f4631920c8ca607fa5bdff0f /libavcodec/v4l2_m2m_enc.c
parent0f0f5188acc67a35a8f045505ccf6e2178e5f858 (diff)
avcodec/v4l2_m2m_enc: add support for -force_key_frames
Signed-off-by: Aman Gupta <aman@tmm1.net>
Diffstat (limited to 'libavcodec/v4l2_m2m_enc.c')
-rw-r--r--libavcodec/v4l2_m2m_enc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/v4l2_m2m_enc.c b/libavcodec/v4l2_m2m_enc.c
index 27bb254fc1..a0d5bcf760 100644
--- a/libavcodec/v4l2_m2m_enc.c
+++ b/libavcodec/v4l2_m2m_enc.c
@@ -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);
}