diff utils.c @ 7454:bb5e8cae1d71 libavcodec

Write sample format description within avcodec_string()
author pross
date Thu, 31 Jul 2008 12:56:56 +0000
parents 21770337ff2d
children eaf0ebba81d7
line wrap: on
line diff
--- a/utils.c	Thu Jul 31 12:55:06 2008 +0000
+++ b/utils.c	Thu Jul 31 12:56:56 2008 +0000
@@ -31,6 +31,7 @@
 #include "dsputil.h"
 #include "opt.h"
 #include "imgconvert.h"
+#include "audioconvert.h"
 #include <stdarg.h>
 #include <limits.h>
 #include <float.h>
@@ -1148,6 +1149,10 @@
                      enc->sample_rate,
                      channels_str);
         }
+        if (enc->sample_fmt != SAMPLE_FMT_NONE) {
+            snprintf(buf + strlen(buf), buf_size - strlen(buf),
+                     ", %s", avcodec_get_sample_fmt_name(enc->sample_fmt));
+        }
 
         /* for PCM codecs, compute bitrate directly */
         switch(enc->codec_id) {