Commit 84051d57 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'a7ec3a9a'

* commit 'a7ec3a9a':
  wavpack: drop redundant if/else blocks
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents be72853f a7ec3a9a
...@@ -1138,13 +1138,7 @@ static int wavpack_decode_block(AVCodecContext *avctx, int block_no, ...@@ -1138,13 +1138,7 @@ static int wavpack_decode_block(AVCodecContext *avctx, int block_no,
} }
if (s->stereo_in) { if (s->stereo_in) {
if (avctx->sample_fmt == AV_SAMPLE_FMT_S16) samplecount = wv_unpack_stereo(s, &s->gb, samples, avctx->sample_fmt);
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);
if (samplecount < 0) if (samplecount < 0)
return samplecount; return samplecount;
...@@ -1152,13 +1146,7 @@ static int wavpack_decode_block(AVCodecContext *avctx, int block_no, ...@@ -1152,13 +1146,7 @@ static int wavpack_decode_block(AVCodecContext *avctx, int block_no,
} else { } else {
const int channel_stride = avctx->channels; const int channel_stride = avctx->channels;
if (avctx->sample_fmt == AV_SAMPLE_FMT_S16) samplecount = wv_unpack_mono(s, &s->gb, samples, avctx->sample_fmt);
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);
if (samplecount < 0) if (samplecount < 0)
return samplecount; return samplecount;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment