[FFmpeg-devel] [PATCH 1/2] fftools/ffmpeg: Refine the do_video_out.

mypopy at gmail.com mypopy at gmail.com
Fri Nov 9 02:45:27 EET 2018


On Thu, Nov 8, 2018 at 11:45 PM Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:
>
> 2018-11-08 16:35 GMT+01:00, Jun Zhao <mypopydev at gmail.com>:
> > Signed-off-by: Jun Zhao <mypopydev at gmail.com>
> > ---
> >  fftools/ffmpeg.c |   62
> > ++++++++++++++++++++++++-----------------------------
> >  1 files changed, 28 insertions(+), 34 deletions(-)
> >
> > diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
> > index da4259a..e989e7a 100644
> > --- a/fftools/ffmpeg.c
> > +++ b/fftools/ffmpeg.c
> > @@ -1193,33 +1193,27 @@ static void do_video_out(OutputFile *of,
> >      }
> >      ost->last_dropped = nb_frames == nb0_frames && next_picture;
> >
> > -  /* duplicates frame if needed */
> > -  for (i = 0; i < nb_frames; i++) {
> > -    AVFrame *in_picture;
> > -    av_init_packet(&pkt);
> > -    pkt.data = NULL;
> > -    pkt.size = 0;
> > -
> > -    if (i < nb0_frames && ost->last_frame) {
> > -        in_picture = ost->last_frame;
> > -    } else
> > -        in_picture = next_picture;
> > +    /* duplicates frame if needed */
> > +    for (i = 0; i < nb_frames; i++) {
> > +        AVFrame *in_picture;
> > +        int forced_keyframe = 0;
> > +        double pts_time;
> > +        av_init_packet(&pkt);
> > +        pkt.data = NULL;
> > +        pkt.size = 0;
> >
> > -    if (!in_picture)
> > -        return;
> > +        if (i < nb0_frames && ost->last_frame) {
> > +            in_picture = ost->last_frame;
> > +        } else
> > +            in_picture = next_picture;
>
> This patch seems to mix functional changes with re-indentation.
> The patch will be much easier to review if you move all re-indentation
> into the second patch.
>
> Carl Eugen
Will split the patch and move the re-indentataion to 2nd patch, Thanks


More information about the ffmpeg-devel mailing list