diff options
author | Anton Khirnov <anton@khirnov.net> | 2013-05-25 07:49:25 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2013-05-28 08:01:16 +0200 |
commit | a7ec3a9a4eea4e374afcd6e05828b103e6fcb601 (patch) | |
tree | d922ec4b4b6663011d3a7f9d47c4841d1de8853d /libavcodec | |
parent | 7b44c9918086c6aeacf7ef9f902af38b97f43170 (diff) | |
download | ffmpeg-a7ec3a9a4eea4e374afcd6e05828b103e6fcb601.tar.gz |
wavpack: drop redundant if/else blocks
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/wavpack.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c index 7136e7aa16..4349ccb954 100644 --- a/libavcodec/wavpack.c +++ b/libavcodec/wavpack.c @@ -1125,13 +1125,7 @@ static int wavpack_decode_block(AVCodecContext *avctx, int block_no, } if (s->stereo_in) { - if (avctx->sample_fmt == AV_SAMPLE_FMT_S16) - samplecount = wv_unpack_stereo(s, &s->gb, samples, AV_SAMPLE_FMT_S16); - else if (avctx->sample_fmt == AV_SAMPLE_FMT_S32) - samplecount = wv_unpack_stereo(s, &s->gb, samples, AV_SAMPLE_FMT_S32); - else - samplecount = wv_unpack_stereo(s, &s->gb, samples, AV_SAMPLE_FMT_FLT); - + samplecount = wv_unpack_stereo(s, &s->gb, samples, avctx->sample_fmt); if (samplecount < 0) return samplecount; @@ -1139,13 +1133,7 @@ static int wavpack_decode_block(AVCodecContext *avctx, int block_no, } else { const int channel_stride = avctx->channels; - if (avctx->sample_fmt == AV_SAMPLE_FMT_S16) - samplecount = wv_unpack_mono(s, &s->gb, samples, AV_SAMPLE_FMT_S16); - else if (avctx->sample_fmt == AV_SAMPLE_FMT_S32) - samplecount = wv_unpack_mono(s, &s->gb, samples, AV_SAMPLE_FMT_S32); - else - samplecount = wv_unpack_mono(s, &s->gb, samples, AV_SAMPLE_FMT_FLT); - + samplecount = wv_unpack_mono(s, &s->gb, samples, avctx->sample_fmt); if (samplecount < 0) return samplecount; |