summaryrefslogtreecommitdiff
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2014-10-17 11:31:46 +0100
committerVittorio Giovara <vittorio.giovara@gmail.com>2014-10-17 14:45:07 +0100
commitbae557edcea996328e8ff48b9e074a4210f7e6b4 (patch)
tree44e866f9ab6609a6bb3899101240fda922d3fb9b /libavcodec/utils.c
parent66e9f839536238945fbfe9d2041b6891cb150e45 (diff)
dump: display codec tags when available
For both audio and video.
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index d500083bbf..95d2193abc 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -1939,6 +1939,12 @@ 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 (enc->codec_tag) {
+ char tag_buf[32];
+ av_get_codec_tag_string(tag_buf, sizeof(tag_buf), enc->codec_tag);
+ snprintf(buf + strlen(buf), buf_size - strlen(buf),
+ " [%s / 0x%04X]", tag_buf, enc->codec_tag);
+ }
av_strlcat(buf, "\n ", buf_size);
snprintf(buf + strlen(buf), buf_size - strlen(buf),
@@ -2004,6 +2010,13 @@ 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 (enc->codec_tag) {
+ char tag_buf[32];
+ av_get_codec_tag_string(tag_buf, sizeof(tag_buf), enc->codec_tag);
+ snprintf(buf + strlen(buf), buf_size - strlen(buf),
+ " [%s / 0x%04X]", tag_buf, enc->codec_tag);
+ }
+
av_strlcat(buf, "\n ", buf_size);
if (enc->sample_rate) {
snprintf(buf + strlen(buf), buf_size - strlen(buf),