[FFmpeg-devel] [PATCH 2/2] avcodec_string: Print the used codec if it differs from the codec_id name.
Paul B Mahol
onemda at gmail.com
Fri Apr 26 21:42:03 CEST 2013
On 4/26/13, Michael Niedermayer <michaelni at gmx.at> wrote:
> Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> ---
> libavcodec/utils.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/libavcodec/utils.c b/libavcodec/utils.c
> index 6c87d15..245ae89 100644
> --- a/libavcodec/utils.c
> +++ b/libavcodec/utils.c
> @@ -2508,6 +2508,10 @@ void avcodec_string(char *buf, int buf_size,
> AVCodecContext *enc, int encode)
> snprintf(buf, buf_size, "%s: %s", codec_type ? codec_type : "unknown",
> codec_name);
> buf[0] ^= 'a' ^ 'A'; /* first letter in uppercase */
> +
> + if (enc->codec && strcmp(enc->codec->name, codec_name))
> + snprintf(buf + strlen(buf), buf_size - strlen(buf), " (%s)",
> enc->codec->name);
> +
> if (profile)
> snprintf(buf + strlen(buf), buf_size - strlen(buf), " (%s)",
> profile);
> if (enc->codec_tag) {
> --
> 1.7.9.5
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
Nice idea, fine for me.
More information about the ffmpeg-devel
mailing list