Commit bae557ed authored by Vittorio Giovara's avatar Vittorio Giovara

dump: display codec tags when available

For both audio and video.
parent 66e9f839
...@@ -1939,6 +1939,12 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode) ...@@ -1939,6 +1939,12 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
if (profile) if (profile)
snprintf(buf + strlen(buf), buf_size - strlen(buf), snprintf(buf + strlen(buf), buf_size - strlen(buf),
" (%s)", profile); " (%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); av_strlcat(buf, "\n ", buf_size);
snprintf(buf + strlen(buf), buf_size - strlen(buf), snprintf(buf + strlen(buf), buf_size - strlen(buf),
...@@ -2004,6 +2010,13 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode) ...@@ -2004,6 +2010,13 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
if (profile) if (profile)
snprintf(buf + strlen(buf), buf_size - strlen(buf), snprintf(buf + strlen(buf), buf_size - strlen(buf),
" (%s)", profile); " (%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); av_strlcat(buf, "\n ", buf_size);
if (enc->sample_rate) { if (enc->sample_rate) {
snprintf(buf + strlen(buf), buf_size - strlen(buf), snprintf(buf + strlen(buf), buf_size - strlen(buf),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment