From 02bfb0c4e4271cdaa264a974c52cf49114a90ac5 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 30 Jan 2009 15:57:51 +0100 Subject: [PATCH] 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. --- NEWS | 1 + src/decoder/wavpack_plugin.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 416d8ae0d..d84422ad0 100644 --- a/NEWS +++ b/NEWS @@ -37,6 +37,7 @@ ver 0.15 - (200?/??/??) ver 0.14.2 (2009/??/??) * decoders: - ffmpeg: added support for the tags comment, genre, year + - wavpack: pass NULL if the .wvc file fails to open * audio outputs: - jack: allocate ring buffers before connecting - jack: clear "shutdown" flag on reconnect 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) {