> -----Original Message----- > From: Aman Gupta [mailto:a...@tmm1.net] On Behalf Of Aman Gupta > Sent: Saturday, September 14, 2019 7:31 AM > To: ffmpeg-devel@ffmpeg.org > Cc: Guo, Yejun <yejun....@intel.com>; Aman Gupta <a...@tmm1.net> > Subject: [PATCH] avcodec/v4l2_m2m_enc: check for > V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME availability before using > > From: Aman Gupta <a...@tmm1.net> > > Signed-off-by: Aman Gupta <a...@tmm1.net> > --- > libavcodec/v4l2_m2m_enc.c | 2 ++ > 1 file changed, 2 insertions(+) > > 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
thanks, the specific build issue is fixed on my system, but I still met other v4l2 build issues on master with this patch. src/libavcodec/v4l2_m2m_enc.c: In function 'v4l2_set_ext_ctrl': src/libavcodec/v4l2_m2m_enc.c:51:12: warning: braces around scalar initializer struct v4l2_ext_controls ctrls = { { 0 } }; ^ src/libavcodec/v4l2_m2m_enc.c:51:12: note: (near initialization for 'ctrls.ctrl_class') src/libavcodec/v4l2_m2m_enc.c: In function 'v4l2_get_ext_ctrl': src/libavcodec/v4l2_m2m_enc.c:71:12: warning: braces around scalar initializer struct v4l2_ext_controls ctrls = { { 0 } }; ^ src/libavcodec/v4l2_m2m_enc.c:71:12: note: (near initialization for 'ctrls.ctrl_class') src/libavcodec/v4l2_buffers.c: In function 'v4l2_buffer_swframe_to_buf': src/libavcodec/v4l2_buffers.c:354:10: error: 'V4L2_PIX_FMT_YUV422M' undeclared (first use in this function) case V4L2_PIX_FMT_YUV422M: ^ src/libavcodec/v4l2_buffers.c:354:10: note: each undeclared identifier is reported only once for each function it appears in src/libavcodec/v4l2_buffers.c:355:10: error: 'V4L2_PIX_FMT_YVU422M' undeclared (first use in this function) case V4L2_PIX_FMT_YVU422M: ^ src/libavcodec/v4l2_buffers.c:356:10: error: 'V4L2_PIX_FMT_YUV444M' undeclared (first use in this function) case V4L2_PIX_FMT_YUV444M: ^ src/libavcodec/v4l2_buffers.c:357:10: error: 'V4L2_PIX_FMT_YVU444M' undeclared (first use in this function) case V4L2_PIX_FMT_YVU444M: ^ src/ffbuild/common.mak:59: recipe for target 'libavcodec/v4l2_buffers.o' failed make: *** [libavcodec/v4l2_buffers.o] Error 1 make: *** Waiting for unfinished jobs.... > > return ff_v4l2_context_enqueue_frame(output, frame); > } > -- > 2.20.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".