Skip to content

Commit c83bb62

Browse files
authored
Prevent double-free of opus decoder (#1982)
Thanks for caching this: I must have overlooke this when I migrated change the implementation to use Vector.
1 parent 94e40c4 commit c83bb62

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/AudioTools/AudioCodecs/CodecOpus.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,7 @@ class OpusAudioDecoder : public AudioDecoder {
176176

177177
void end() override {
178178
TRACED();
179-
if (dec) {
180-
opus_decoder_destroy(dec);
181-
dec = nullptr;
182-
}
179+
dec = nullptr;
183180
outbuf.resize(0);
184181
decbuf.resize(0);
185182
active = false;

0 commit comments

Comments
 (0)