[Ffmpeg-cvslog] r5663 - in trunk: libavcodec/utils.c libavformat/voc.c
aurel
subversion
Sat Jul 8 00:42:36 CEST 2006
Author: aurel
Date: Sat Jul 8 00:42:36 2006
New Revision: 5663
Modified:
trunk/libavcodec/utils.c
trunk/libavformat/voc.c
Log:
simplify the voc demuxer using av_get_bits_per_sample()
Modified: trunk/libavcodec/utils.c
==============================================================================
--- trunk/libavcodec/utils.c (original)
+++ trunk/libavcodec/utils.c Sat Jul 8 00:42:36 2006
@@ -1306,6 +1306,11 @@
int av_get_bits_per_sample(enum CodecID codec_id){
switch(codec_id){
+ case CODEC_ID_ADPCM_CT:
+ case CODEC_ID_ADPCM_SBPRO_2:
+ case CODEC_ID_ADPCM_SBPRO_3:
+ case CODEC_ID_ADPCM_SBPRO_4:
+ return 0;
case CODEC_ID_PCM_ALAW:
case CODEC_ID_PCM_MULAW:
case CODEC_ID_PCM_S8:
Modified: trunk/libavformat/voc.c
==============================================================================
--- trunk/libavformat/voc.c (original)
+++ trunk/libavformat/voc.c Sat Jul 8 00:42:36 2006
@@ -93,18 +93,6 @@
return 0;
}
-static int voc_get_bps(int codec_id)
-{
- switch (codec_id) {
- case CODEC_ID_PCM_S16LE:
- return 16;
- case CODEC_ID_ADPCM_CT:
- return 4;
- default:
- return 8;
- }
-}
-
int
voc_get_packet(AVFormatContext *s, AVPacket *pkt, AVStream *st, int max_size)
{
@@ -130,7 +118,7 @@
dec->sample_rate = sample_rate;
dec->channels = channels;
dec->codec_id = codec_get_id(voc_codec_tags, get_byte(pb));
- dec->bits_per_sample = voc_get_bps(dec->codec_id);
+ dec->bits_per_sample = av_get_bits_per_sample(dec->codec_id);
voc->remaining_size -= 2;
max_size -= 2;
channels = 1;
More information about the ffmpeg-cvslog
mailing list