aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-11-12 21:25:02 +0100
committerMax Kellermann <max@duempel.org>2008-11-12 21:25:02 +0100
commit600e13228020d34b8f32826e25c222566a1fdeda (patch)
treeaf044213fc53cebb3e81eaca68164a373f075df8 /src/decoder
parentef80464c0c30cffe9e507c45fd14d4a5da5406ae (diff)
downloadmpd-600e13228020d34b8f32826e25c222566a1fdeda.tar.gz
mpd-600e13228020d34b8f32826e25c222566a1fdeda.tar.xz
mpd-600e13228020d34b8f32826e25c222566a1fdeda.zip
wavpack: calculate outsamplesize with audio_format_frame_size()
Diffstat (limited to '')
-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);