aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/wavpack_plugin.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/decoder/wavpack_plugin.c')
-rw-r--r--src/decoder/wavpack_plugin.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/decoder/wavpack_plugin.c b/src/decoder/wavpack_plugin.c
index 7d649a940..2051da0ad 100644
--- a/src/decoder/wavpack_plugin.c
+++ b/src/decoder/wavpack_plugin.c
@@ -158,11 +158,7 @@ wavpack_decode(struct decoder * decoder, WavpackContext *wpc, bool canseek,
allsamples = WavpackGetNumSamples(wpc);
bytes_per_sample = WavpackGetBytesPerSample(wpc);
- outsamplesize = bytes_per_sample;
- if (outsamplesize == 3) {
- outsamplesize = 4;
- }
- outsamplesize *= audio_format.channels;
+ outsamplesize = audio_format_frame_size(&audio_format);
/* wavpack gives us all kind of samples in a 32-bit space */
samplesreq = sizeof(chunk) / (4 * audio_format.channels);