[FFmpeg-devel] [PATCH 1/5] avcodec/v4l2_m2m_enc: reindent code

lance.lmwang at gmail.com lance.lmwang at gmail.com
Mon May 4 16:17:35 EEST 2020


On Thu, Apr 30, 2020 at 11:47:11AM -0400, Andriy Gelman wrote:
> On Thu, 30. Apr 20:59, lance.lmwang at gmail.com wrote:
> > From: Limin Wang <lance.lmwang at gmail.com>
> > 
> > Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
> > ---
> >  libavcodec/v4l2_m2m_enc.c | 20 ++++++++++----------
> >  1 file changed, 10 insertions(+), 10 deletions(-)
> > 
> > diff --git a/libavcodec/v4l2_m2m_enc.c b/libavcodec/v4l2_m2m_enc.c
> > index 8454e2326c..98b93c61af 100644
> > --- a/libavcodec/v4l2_m2m_enc.c
> > +++ b/libavcodec/v4l2_m2m_enc.c
> > @@ -204,11 +204,11 @@ static int v4l2_prepare_encoder(V4L2m2mContext *s)
> >      switch (avctx->codec_id) {
> >      case AV_CODEC_ID_H264:
> >          if (avctx->profile != FF_PROFILE_UNKNOWN) {
> > -        val = v4l2_h264_profile_from_ff(avctx->profile);
> > -        if (val < 0)
> > -            av_log(avctx, AV_LOG_WARNING, "h264 profile not found\n");
> > -        else
> > -            v4l2_set_ext_ctrl(s, MPEG_CID(H264_PROFILE), val, "h264 profile", 1);
> > +            val = v4l2_h264_profile_from_ff(avctx->profile);
> > +            if (val < 0)
> > +                av_log(avctx, AV_LOG_WARNING, "h264 profile not found\n");
> > +            else
> > +                v4l2_set_ext_ctrl(s, MPEG_CID(H264_PROFILE), val, "h264 profile", 1);
> >          }
> >          qmin_cid = MPEG_CID(H264_MIN_QP);
> >          qmax_cid = MPEG_CID(H264_MAX_QP);
> > @@ -217,11 +217,11 @@ static int v4l2_prepare_encoder(V4L2m2mContext *s)
> >          break;
> >      case AV_CODEC_ID_MPEG4:
> >          if (avctx->profile != FF_PROFILE_UNKNOWN) {
> > -        val = v4l2_mpeg4_profile_from_ff(avctx->profile);
> > -        if (val < 0)
> > -            av_log(avctx, AV_LOG_WARNING, "mpeg4 profile not found\n");
> > -        else
> > -            v4l2_set_ext_ctrl(s, MPEG_CID(MPEG4_PROFILE), val, "mpeg4 profile", 1);
> > +            val = v4l2_mpeg4_profile_from_ff(avctx->profile);
> > +            if (val < 0)
> > +                av_log(avctx, AV_LOG_WARNING, "mpeg4 profile not found\n");
> > +            else
> > +                v4l2_set_ext_ctrl(s, MPEG_CID(MPEG4_PROFILE), val, "mpeg4 profile", 1);
> >          }
> >          qmin_cid = MPEG_CID(MPEG4_MIN_QP);
> >          qmax_cid = MPEG_CID(MPEG4_MAX_QP);
> 
> lgtm

will apply the rest of patchset #1,#2,#5 tomorrow if no more comments.

> 
> Thanks,
> -- 
> Andriy

-- 
Thanks,
Limin Wang


More information about the ffmpeg-devel mailing list