Skip to content

Commit 10973ad

Browse files
committed
VorbisDecoder: prevent multiple calls to ov_clear
1 parent bb718dc commit 10973ad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/AudioTools/AudioCodecs/CodecVorbis.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ class VorbisDecoder : public StreamingDecoder {
5656
/// Releases the reserved memory
5757
void end() override {
5858
LOGI("end");
59-
active = false;
6059
is_ov_open = false;
6160
is_first = true;
62-
ov_clear(&file);
61+
if (active) ov_clear(&file);
62+
active = false;
6363
}
6464

6565
/// Provides the last available MP3FrameInfo

0 commit comments

Comments
 (0)