[FFmpeg-devel] [PATCH]Print number of reference frames if debug level >= verbose

Michael Niedermayer michaelni at gmx.at
Wed Mar 11 04:03:27 CET 2015


On Tue, Mar 10, 2015 at 03:27:20PM +0100, Carl Eugen Hoyos wrote:
> Hi!
> 
> Attached patch prints the number of reference frames 
> on increased loglevel.
> 
> Please comment, Carl Eugen

>  utils.c |    2 ++
>  1 file changed, 2 insertions(+)
> 3027911b398c8e5f89bc5b868f980f4a2ff50b01  patchrefs.diff
> diff --git a/libavcodec/utils.c b/libavcodec/utils.c
> index 5b28496..aa00581 100644
> --- a/libavcodec/utils.c
> +++ b/libavcodec/utils.c
> @@ -3024,6 +3024,8 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
>  
>      if (profile)
>          snprintf(buf + strlen(buf), buf_size - strlen(buf), " (%s)", profile);
> +    if (av_log_get_level() >= AV_LOG_VERBOSE && enc->refs)
> +        snprintf(buf + strlen(buf), buf_size - strlen(buf), ", %d reference frame(s)", enc->refs);

this should only be printed for video and the "s" should only be
printed for refs > 1

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I am the wisest man alive, for I know one thing, and that is that I know
nothing. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150311/19358e50/attachment.asc>


More information about the ffmpeg-devel mailing list