diff options
author | Peter Ross <pross@xvid.org> | 2008-07-31 12:56:56 +0000 |
---|---|---|
committer | Peter Ross <pross@xvid.org> | 2008-07-31 12:56:56 +0000 |
commit | 9e82a113e56b5bcc97bff32bdfce48ab24b7c267 (patch) | |
tree | ee016e0a071217f42a9889439dbe2d340dbb4daf | |
parent | c2b28bb9756403d54b8be8c4556354f378c815b4 (diff) | |
download | ffmpeg-9e82a113e56b5bcc97bff32bdfce48ab24b7c267.tar.gz |
Write sample format description within avcodec_string()
Originally committed as revision 14485 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/utils.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 6af208dd52..1c98c312f0 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -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 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode) 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) { |