mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-24 11:49:48 +00:00
wavpack: drop redundant if/else blocks
This commit is contained in:
parent
7b44c99180
commit
a7ec3a9a4e
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user