]> git.sesse.net Git - ffmpeg/commitdiff
dump: display codec tags when available
authorVittorio Giovara <vittorio.giovara@gmail.com>
Fri, 17 Oct 2014 10:31:46 +0000 (11:31 +0100)
committerVittorio Giovara <vittorio.giovara@gmail.com>
Fri, 17 Oct 2014 13:45:07 +0000 (14:45 +0100)
For both audio and video.

libavcodec/utils.c

index d500083bbf876565fe2e2534922d1840b899e1cc..95d2193abc80bc4bd609b06c11d3e367926af702 100644 (file)
@@ -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),