summaryrefslogtreecommitdiff
path: root/libavcodec/v4l2_m2m_enc.c
diff options
context:
space:
mode:
authorAman Gupta <aman@tmm1.net>2019-09-13 16:30:13 -0700
committerAman Gupta <aman@tmm1.net>2019-09-15 11:10:09 -0700
commit81abf90aeae6ab88e820b664df4ea011b345b725 (patch)
treed5b045a44cfbf873863d8e9403ce39387f1dd4f7 /libavcodec/v4l2_m2m_enc.c
parent6c0167f6f67b160b098957b96e0b5b0001c407a5 (diff)
avcodec/v4l2: fix compile with older videodev2.h
Some of these symbols are only defined in newer kernel releases. Signed-off-by: Aman Gupta <aman@tmm1.net>
Diffstat (limited to 'libavcodec/v4l2_m2m_enc.c')
-rw-r--r--libavcodec/v4l2_m2m_enc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/v4l2_m2m_enc.c b/libavcodec/v4l2_m2m_enc.c
index 4849bc26c5..474e6bef89 100644
--- a/libavcodec/v4l2_m2m_enc.c
+++ b/libavcodec/v4l2_m2m_enc.c
@@ -245,8 +245,10 @@ static int v4l2_send_frame(AVCodecContext *avctx, const AVFrame *frame)
V4L2m2mContext *s = ((V4L2m2mPriv*)avctx->priv_data)->context;
V4L2Context *const output = &s->output;
+#ifdef V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME
if (frame && frame->pict_type == AV_PICTURE_TYPE_I)
v4l2_set_ext_ctrl(s, MPEG_CID(FORCE_KEY_FRAME), 0, "force key frame");
+#endif
return ff_v4l2_context_enqueue_frame(output, frame);
}