aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-30 15:57:51 +0100
committerMax Kellermann <max@duempel.org>2009-01-30 16:05:02 +0100
commit02bfb0c4e4271cdaa264a974c52cf49114a90ac5 (patch)
tree4199e39cf4fcfbeaab894a59f2a103fd3040bd7e /src/decoder
parent0d3dff95129c8879a601b90a14c6c6c8c1c67b28 (diff)
downloadmpd-02bfb0c4e4271cdaa264a974c52cf49114a90ac5.tar.gz
mpd-02bfb0c4e4271cdaa264a974c52cf49114a90ac5.tar.xz
mpd-02bfb0c4e4271cdaa264a974c52cf49114a90ac5.zip
wavpack: pass NULL if the .wvc file fails to open
The wavpack library seems to use the .wvc stream even if the OPEN_WVC flag is not set. In this case, pass NULL to be sure libwavpack won't use it.
Diffstat (limited to '')
-rw-r--r--src/decoder/wavpack_plugin.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/decoder/wavpack_plugin.c b/src/decoder/wavpack_plugin.c
index e08ec1dfc..962cf6425 100644
--- a/src/decoder/wavpack_plugin.c
+++ b/src/decoder/wavpack_plugin.c
@@ -522,7 +522,9 @@ wavpack_streamdecode(struct decoder * decoder, struct input_stream *is)
wavpack_input_init(&isp, decoder, is);
wpc = WavpackOpenFileInputEx(
- &mpd_is_reader, &isp, &isp_wvc, error, open_flags, 23
+ &mpd_is_reader, &isp,
+ open_flags & OPEN_WVC ? &isp_wvc : NULL,
+ error, open_flags, 23
);
if (wpc == NULL) {