diff options
author | Max Kellermann <max@duempel.org> | 2014-05-11 16:59:19 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-05-11 17:12:50 +0200 |
commit | 82337dec44347017ca04fe975e85e6d9e4edb635 (patch) | |
tree | 308036d4a7abbd2bb04ed472dc1fbacdc2587871 /src/decoder | |
parent | f1d07002521a4a98acf130127cf42aef20a5e258 (diff) | |
download | mpd-82337dec44347017ca04fe975e85e6d9e4edb635.tar.gz mpd-82337dec44347017ca04fe975e85e6d9e4edb635.tar.xz mpd-82337dec44347017ca04fe975e85e6d9e4edb635.zip |
InputStream: add virtual destructor
Replaces the method Close().
Diffstat (limited to 'src/decoder')
-rw-r--r-- | src/decoder/DecoderThread.cxx | 4 | ||||
-rw-r--r-- | src/decoder/plugins/WavpackDecoderPlugin.cxx | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/decoder/DecoderThread.cxx b/src/decoder/DecoderThread.cxx index 4dd3c215c..06735de83 100644 --- a/src/decoder/DecoderThread.cxx +++ b/src/decoder/DecoderThread.cxx @@ -271,7 +271,7 @@ decoder_run_stream(Decoder &decoder, const char *uri) decoder_run_stream_fallback(decoder, *input_stream)); dc.Unlock(); - input_stream->Close(); + delete input_stream; dc.Lock(); return success; @@ -318,7 +318,7 @@ TryDecoderFile(Decoder &decoder, Path path_fs, const char *suffix, dc.Unlock(); - input_stream->Close(); + delete input_stream; if (success) { dc.Lock(); diff --git a/src/decoder/plugins/WavpackDecoderPlugin.cxx b/src/decoder/plugins/WavpackDecoderPlugin.cxx index 070a913f2..eb15a3380 100644 --- a/src/decoder/plugins/WavpackDecoderPlugin.cxx +++ b/src/decoder/plugins/WavpackDecoderPlugin.cxx @@ -467,7 +467,7 @@ wavpack_open_wvc(Decoder &decoder, const char *uri, size_t nbytes = decoder_read(decoder, *is_wvc, &first_byte, sizeof(first_byte)); if (nbytes == 0) { - is_wvc->Close(); + delete is_wvc; return nullptr; } @@ -519,7 +519,7 @@ wavpack_streamdecode(Decoder &decoder, InputStream &is) WavpackCloseFile(wpc); if (open_flags & OPEN_WVC) { - is_wvc->Close(); + delete is_wvc; } } |