comparison 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
comparison
equal deleted inserted replaced
7453:d1d15f2dca4c 7454:bb5e8cae1d71
29 #include "libavutil/crc.h" 29 #include "libavutil/crc.h"
30 #include "avcodec.h" 30 #include "avcodec.h"
31 #include "dsputil.h" 31 #include "dsputil.h"
32 #include "opt.h" 32 #include "opt.h"
33 #include "imgconvert.h" 33 #include "imgconvert.h"
34 #include "audioconvert.h"
34 #include <stdarg.h> 35 #include <stdarg.h>
35 #include <limits.h> 36 #include <limits.h>
36 #include <float.h> 37 #include <float.h>
37 #if !defined(HAVE_MKSTEMP) 38 #if !defined(HAVE_MKSTEMP)
38 #include <fcntl.h> 39 #include <fcntl.h>
1146 snprintf(buf + strlen(buf), buf_size - strlen(buf), 1147 snprintf(buf + strlen(buf), buf_size - strlen(buf),
1147 ", %d Hz, %s", 1148 ", %d Hz, %s",
1148 enc->sample_rate, 1149 enc->sample_rate,
1149 channels_str); 1150 channels_str);
1150 } 1151 }
1152 if (enc->sample_fmt != SAMPLE_FMT_NONE) {
1153 snprintf(buf + strlen(buf), buf_size - strlen(buf),
1154 ", %s", avcodec_get_sample_fmt_name(enc->sample_fmt));
1155 }
1151 1156
1152 /* for PCM codecs, compute bitrate directly */ 1157 /* for PCM codecs, compute bitrate directly */
1153 switch(enc->codec_id) { 1158 switch(enc->codec_id) {
1154 case CODEC_ID_PCM_S32LE: 1159 case CODEC_ID_PCM_S32LE:
1155 case CODEC_ID_PCM_S32BE: 1160 case CODEC_ID_PCM_S32BE: