Skip to content

Commit 776f8d6

Browse files
committed
EncodedAudioStream: RAII missing destructor
1 parent 0127d34 commit 776f8d6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/AudioTools/AudioCodecs/AudioEncoded.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ class EncodedAudioOutput : public ModifyingOutput {
7070
active = false;
7171
}
7272

73+
virtual ~EncodedAudioOutput() { end(); }
74+
7375
/// Define object which need to be notified if the basinfo is changing
7476
void addNotifyAudioChange(AudioInfoSupport &bi) override {
7577
TRACEI();
@@ -285,6 +287,8 @@ class EncodedAudioStream : public ReformatBaseStream {
285287

286288
EncodedAudioStream(AudioEncoder *encoder) { setEncoder(encoder); }
287289

290+
virtual ~EncodedAudioStream() { end(); }
291+
288292
void setEncoder(AudioEncoder *encoder) { enc_out.setEncoder(encoder); }
289293

290294
void setDecoder(AudioDecoder *decoder) { enc_out.setDecoder(decoder); }

0 commit comments

Comments
 (0)