Mercurial > libavformat.hg
changeset 1159:712f2acca29a libavformat
simplify the voc demuxer using av_get_bits_per_sample()
author | aurel |
---|---|
date | Fri, 07 Jul 2006 22:42:36 +0000 |
parents | 51d3928ab00d |
children | c10e0dbce7de |
files | voc.c |
diffstat | 1 files changed, 1 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/voc.c Fri Jul 07 17:50:09 2006 +0000 +++ b/voc.c Fri Jul 07 22:42:36 2006 +0000 @@ -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;