diff options
author | Max Kellermann <max@duempel.org> | 2008-08-26 08:27:14 +0200 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-08-31 00:38:31 -0700 |
commit | 4ea80a16634be04aad3dfcb5cb46afa8a7e84827 (patch) | |
tree | b1299d4cfd4cb0a6911992d4b7ca3e868919e836 /src/inputPlugins | |
parent | 82107df9ddbbf739b6daa08c391e15a0b9b1cdfd (diff) | |
download | mpd-4ea80a16634be04aad3dfcb5cb46afa8a7e84827.tar.gz mpd-4ea80a16634be04aad3dfcb5cb46afa8a7e84827.tar.xz mpd-4ea80a16634be04aad3dfcb5cb46afa8a7e84827.zip |
wavpack: don't use "isp" before initialization
The old code called can_seek() with the uninitialized pointer
"isp.is". Has this ever worked? Anyway, initialize "isp" first, then
call can_seek(&isp).
Diffstat (limited to 'src/inputPlugins')
-rw-r--r-- | src/inputPlugins/wavpack_plugin.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/inputPlugins/wavpack_plugin.c b/src/inputPlugins/wavpack_plugin.c index 5e593ad98..c7e024a41 100644 --- a/src/inputPlugins/wavpack_plugin.c +++ b/src/inputPlugins/wavpack_plugin.c @@ -494,15 +494,12 @@ static int wavpack_streamdecode(InputStream *is) InputStream is_wvc; int open_flags = OPEN_2CH_MAX | OPEN_NORMALIZE /*| OPEN_STREAMING*/; InputStreamPlus isp, isp_wvc; - int canseek; if (wavpack_open_wvc(&is_wvc)) { initInputStreamPlus(&isp_wvc, &is_wvc); open_flags |= OPEN_WVC; } - canseek = can_seek(&isp); - initInputStreamPlus(&isp, is); wpc = WavpackOpenFileInputEx(&mpd_is_reader, &isp, &isp_wvc, error, open_flags, 15); @@ -514,7 +511,7 @@ static int wavpack_streamdecode(InputStream *is) return -1; } - wavpack_decode(wpc, canseek, NULL); + wavpack_decode(wpc, can_seek(&isp), NULL); WavpackCloseFile(wpc); if (open_flags & OPEN_WVC) |