summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2014-09-08 17:45:47 +0200
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2014-09-08 17:49:11 +0200
commit2b1f6a351638da0b2e2135ea7febc880d0b8b7d3 (patch)
treec95dd11ca9873270411eb78a3eea3b1a8534eced
parent5a6dd925cb3f52972a29f0f84e7edd03572b00ae (diff)
Print the actual bit depth for audio if it is different from the sample_fmt bit depth.
This is already done for video.
-rw-r--r--libavcodec/utils.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 9d3fcfd730..397819297d 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -2978,6 +2978,10 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
snprintf(buf + strlen(buf), buf_size - strlen(buf),
", %s", av_get_sample_fmt_name(enc->sample_fmt));
}
+ if ( enc->bits_per_raw_sample > 0
+ && enc->bits_per_raw_sample != av_get_bytes_per_sample(enc->sample_fmt) * 8)
+ snprintf(buf + strlen(buf), buf_size - strlen(buf),
+ " (%d bit)", enc->bits_per_raw_sample);
break;
case AVMEDIA_TYPE_DATA:
if (av_log_get_level() >= AV_LOG_DEBUG) {