Browse Source

dump: display codec tags when available

For both audio and video.
tags/n2.5
Vittorio Giovara 11 years ago
parent
commit
bae557edce
1 changed files with 13 additions and 0 deletions
  1. +13
    -0
      libavcodec/utils.c

+ 13
- 0
libavcodec/utils.c View 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),


Loading…
Cancel
Save