[FFmpeg-devel] [PATCH v1] lavf/dump: dump the vbv_delay with N/A instead of 18446744073709551615

Michael Niedermayer michael at niedermayer.cc
Tue Aug 20 17:59:55 EEST 2019


On Sun, Aug 18, 2019 at 10:31:20PM +0800, lance.lmwang at gmail.com wrote:
> From: Limin Wang <lance.lmwang at gmail.com>
> 
> Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
> ---
>  libavformat/dump.c | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/libavformat/dump.c b/libavformat/dump.c
> index a3791a3..56814ff 100644
> --- a/libavformat/dump.c
> +++ b/libavformat/dump.c
> @@ -321,13 +321,16 @@ static void dump_cpb(void *ctx, AVPacketSideData *sd)
>  
>      av_log(ctx, AV_LOG_INFO,
>  #if FF_API_UNSANITIZED_BITRATES
> -           "bitrate max/min/avg: %d/%d/%d buffer size: %d vbv_delay: %"PRIu64,
> +           "bitrate max/min/avg: %d/%d/%d buffer size: %d ",
>  #else
> -           "bitrate max/min/avg: %"PRId64"/%"PRId64"/%"PRId64" buffer size: %d vbv_delay: %"PRIu64,
> +           "bitrate max/min/avg: %"PRId64"/%"PRId64"/%"PRId64" buffer size: %d ",
>  #endif
>             cpb->max_bitrate, cpb->min_bitrate, cpb->avg_bitrate,
> -           cpb->buffer_size,
> -           cpb->vbv_delay);
> +           cpb->buffer_size);
> +    if (cpb->vbv_delay == UINT64_MAX)
> +        av_log(ctx, AV_LOG_INFO, "vbv_delay: N/A");
> +    else
> +        av_log(ctx, AV_LOG_INFO, "vbv_delay: %"PRIu64"", cpb->vbv_delay);
>  }

LGTM

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Modern terrorism, a quick summary: Need oil, start war with country that
has oil, kill hundread thousand in war. Let country fall into chaos,
be surprised about raise of fundamantalists. Drop more bombs, kill more
people, be surprised about them taking revenge and drop even more bombs
and strip your own citizens of their rights and freedoms. to be continued
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20190820/ae0a33a6/attachment.sig>


More information about the ffmpeg-devel mailing list