diff options
author | Max Kellermann <max@duempel.org> | 2013-09-05 00:06:31 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-09-05 00:23:14 +0200 |
commit | 7d0269d2cec68c7e55df5b6db3d2266741534b17 (patch) | |
tree | 613f5d7b03bc9624f15167c76f8f4309603944cc /src/decoder/WavpackDecoderPlugin.cxx | |
parent | 52ffdb0a55e43153fa9fc1189316884a630df700 (diff) | |
download | mpd-7d0269d2cec68c7e55df5b6db3d2266741534b17.tar.gz mpd-7d0269d2cec68c7e55df5b6db3d2266741534b17.tar.xz mpd-7d0269d2cec68c7e55df5b6db3d2266741534b17.zip |
InputLegacy: move functions to the input_stream class
Diffstat (limited to 'src/decoder/WavpackDecoderPlugin.cxx')
-rw-r--r-- | src/decoder/WavpackDecoderPlugin.cxx | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/decoder/WavpackDecoderPlugin.cxx b/src/decoder/WavpackDecoderPlugin.cxx index 88394f2c1..f37bd3f12 100644 --- a/src/decoder/WavpackDecoderPlugin.cxx +++ b/src/decoder/WavpackDecoderPlugin.cxx @@ -401,17 +401,13 @@ wavpack_input_get_pos(void *id) static int wavpack_input_set_pos_abs(void *id, uint32_t pos) { - Error error; - return input_stream_lock_seek(wpin(id)->is, pos, SEEK_SET, error) - ? 0 : -1; + return wpin(id)->is->LockSeek(pos, SEEK_SET, IgnoreError()) ? 0 : -1; } static int wavpack_input_set_pos_rel(void *id, int32_t delta, int mode) { - Error error; - return input_stream_lock_seek(wpin(id)->is, delta, mode, error) - ? 0 : -1; + return wpin(id)->is->LockSeek(delta, mode, IgnoreError()) ? 0 : -1; } static int @@ -479,8 +475,7 @@ wavpack_open_wvc(struct decoder *decoder, const char *uri, wvc_url = g_strconcat(uri, "c", NULL); - Error error; - is_wvc = input_stream_open(wvc_url, mutex, cond, error); + is_wvc = input_stream::Open(wvc_url, mutex, cond, IgnoreError()); g_free(wvc_url); if (is_wvc == NULL) @@ -494,7 +489,7 @@ wavpack_open_wvc(struct decoder *decoder, const char *uri, decoder, is_wvc, &first_byte, sizeof(first_byte) ); if (nbytes == 0) { - input_stream_close(is_wvc); + is_wvc->Close(); return NULL; } @@ -545,7 +540,7 @@ wavpack_streamdecode(struct decoder * decoder, struct input_stream *is) WavpackCloseFile(wpc); if (open_flags & OPEN_WVC) { - input_stream_close(is_wvc); + is_wvc->Close(); } } |