aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2006-10-11 10:17:18 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2006-10-11 10:17:18 +0000
commitd50756cdf9220b942374e614c41433a11b731838 (patch)
treea18de4366172fd0302165b6e745e782f38fef63c
parente27d92773eca7ee3f56dca1d4ed199f458374604 (diff)
downloadffmpeg-d50756cdf9220b942374e614c41433a11b731838.tar.gz
use av_get_bits_per_sample
Originally committed as revision 6645 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/aiff.c21
1 files changed, 2 insertions, 19 deletions
diff --git a/libavformat/aiff.c b/libavformat/aiff.c
index b1cc6625a6..8bfbe3b2f9 100644
--- a/libavformat/aiff.c
+++ b/libavformat/aiff.c
@@ -95,23 +95,6 @@ static void get_meta(ByteIOContext *pb, char * str, int strsize, int size)
url_fskip(pb, size);
}
-/* Returns the number of bits per second */
-static int fix_bps(int codec_id)
-{
- switch (codec_id) {
- case CODEC_ID_PCM_S8:
- return 8;
- case CODEC_ID_PCM_S16BE:
- return 16;
- case CODEC_ID_PCM_S24BE:
- return 24;
- case CODEC_ID_PCM_S32BE:
- return 32;
- }
-
- return -1;
-}
-
/* Returns the number of sound data frames or negative on error */
static unsigned int get_aiff_header(ByteIOContext *pb, AVCodecContext *codec,
int size, unsigned version)
@@ -141,14 +124,14 @@ static unsigned int get_aiff_header(ByteIOContext *pb, AVCodecContext *codec,
if (codec->codec_id == CODEC_ID_PCM_S16BE) {
codec->codec_id = aiff_codec_get_id (codec->bits_per_sample);
- codec->bits_per_sample = fix_bps(codec->codec_id);
+ codec->bits_per_sample = av_get_bits_per_sample(codec->codec_id);
}
size -= 4;
} else {
/* Need the codec type */
codec->codec_id = aiff_codec_get_id (codec->bits_per_sample);
- codec->bits_per_sample = fix_bps(codec->codec_id);
+ codec->bits_per_sample = av_get_bits_per_sample(codec->codec_id);
}
if (!codec->codec_id)