Hi!

Attached patch makes avcodec_string() output for audio more similar to video 
with unexpected bit depth.

Please comment, Carl Eugen
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 9d3fcfd..dfc1a04 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -2978,6 +2978,9 @@ 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 != 
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) {
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to