[FFmpeg-devel] [PATCH] ffmpeg.c: allow ffmpeg to output stats for each video stream

Moritz Barsnick barsnick at gmx.net
Sat May 19 15:09:50 EEST 2018


On Fri, May 18, 2018 at 16:54:25 -0700, Wang Cao wrote:

Apart from the functional changes:

>          data_size  += ost->data_size;
> -        if (   (ost->enc_ctx->flags & (AV_CODEC_FLAG_PASS1 | AV_CODEC_FLAG_PASS2))
> +
> +        if ((ost->enc_ctx->flags & (AV_CODEC_FLAG_PASS1 | AV_CODEC_FLAG_PASS2))
>              != AV_CODEC_FLAG_PASS1)

> -    if (nb_frames_dup || nb_frames_drop)
> -        av_bprintf(&buf, " dup=%d drop=%d", nb_frames_dup, nb_frames_drop);
> -    av_bprintf(&buf_script, "dup_frames=%d\n", nb_frames_dup);
> -    av_bprintf(&buf_script, "drop_frames=%d\n", nb_frames_drop);
> +            if (nb_frames_dup || nb_frames_drop)
> +                av_bprintf(&buf, " dup=%d drop=%d", nb_frames_dup, nb_frames_drop);
> +            av_bprintf(&buf_script, "dup_frames=%d\n", nb_frames_dup);
> +            av_bprintf(&buf_script, "drop_frames=%d\n", nb_frames_drop);
>  

> -
> -    fflush(stderr);
> +        fflush(stderr);
>      }

>      }
> -
>      if (is_last_report)

A lot of your changes are cosmetic (empty lines, re-indentation) and do
not belong into a functional patch, if at all.

Furthermore, some large sections are reindented due to moving into or
out of a block. Please avoid that, and make the indentations in a
subsequent patch, to ease review.

Thanks,
Moritz


More information about the ffmpeg-devel mailing list