Skip to content

Commit

Permalink
Ensure MP3 can safely exit on OOM (#716)
Browse files Browse the repository at this point in the history
Fixes #715.  Good catch, @EternityForest
  • Loading branch information
earlephilhower authored Dec 19, 2024
1 parent 90b83fb commit aafabf2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/AudioGeneratorMP3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ AudioGeneratorMP3::AudioGeneratorMP3()
file = NULL;
output = NULL;
buff = NULL;
synth = NULL;
frame = NULL;
stream = NULL;
nsCountMax = 1152/32;
madInitted = false;
}
Expand All @@ -37,6 +40,9 @@ AudioGeneratorMP3::AudioGeneratorMP3(void *space, int size): preallocateSpace(sp
file = NULL;
output = NULL;
buff = NULL;
synth = NULL;
frame = NULL;
stream = NULL;
nsCountMax = 1152/32;
madInitted = false;
}
Expand All @@ -51,6 +57,9 @@ AudioGeneratorMP3::AudioGeneratorMP3(void *buff, int buffSize, void *stream, int
file = NULL;
output = NULL;
buff = NULL;
synth = NULL;
frame = NULL;
stream = NULL;
nsCountMax = 1152/32;
madInitted = false;
}
Expand Down

0 comments on commit aafabf2

Please sign in to comment.