From d2679f59c5a6c8df7a2140d40ab65a17b8e5c023 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 11 Nov 2013 16:15:38 +0100 Subject: PcmConvert: add methods Open(), Close() Replaces Reset() and eliminates the AudioFormat parameters from the Convert() method. --- src/DecoderInternal.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/DecoderInternal.cxx') diff --git a/src/DecoderInternal.cxx b/src/DecoderInternal.cxx index 26f91b2d9..38e54a36c 100644 --- a/src/DecoderInternal.cxx +++ b/src/DecoderInternal.cxx @@ -33,7 +33,11 @@ Decoder::~Decoder() /* caller must flush the chunk */ assert(chunk == nullptr); - delete convert; + if (convert != nullptr) { + convert->Close(); + delete convert; + } + delete song_tag; delete stream_tag; delete decoder_tag; -- cgit v1.2.3