Ensure MP3 can safely exit on OOM (#716)

Fixes #715.  Good catch, @EternityForest
This commit is contained in:
Earle F. Philhower, III authored and GitHub committed 2024-12-19 09:33:01 -08:00
1 parent 90b83fb95e
commit aafabf2367
1 file changed
+9
+9
View File
@@ -27,6 +27,9 @@ AudioGeneratorMP3::AudioGeneratorMP3()
file = NULL;
output = NULL;
buff = NULL;
synth = NULL;
frame = NULL;
stream = NULL;
nsCountMax = 1152/32;
madInitted = false;
}
@@ -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;
}
@@ -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;
}