Only mad_*_finish after a successful mad_*_start
When the input file(stream) doesn't open, you could end up calling mp3::stop() which would try and mad_finish structures that were not yet initialized. Now carry a flag when these are set, and only _finish when it's set.
This commit is contained in:
1 parent
a359222eae
commit
f16cd2b269
2 files changed
+11
-6
No files matched your search
@@ -44,6 +44,7 @@ class AudioGeneratorMP3 : public AudioGenerator
|
||||
int lastChannels;
|
||||
|
||||
// Decoding bits
|
||||
bool madInitted;
|
||||
struct mad_stream stream;
|
||||
struct mad_frame frame;
|
||||
struct mad_synth synth;
|
||||
|
||||
Reference in new issue
Block a user