summaryrefslogtreecommitdiff
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-04-26 18:11:37 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-04-27 00:49:14 +0200
commit24bb01f038653cb356d2544d0d32da15a6443ab1 (patch)
treeb392cc9cc82e1c84bb3a481bb66b445b64619561 /libavcodec/utils.c
parent59a3b6b75148350f7c14db85ea18d36eac2b9611 (diff)
avcodec_string: Print the used codec if it differs from the codec_id name.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 6c87d15778..245ae89fa5 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) {