From 854431b784625773037d8ce9ef4a01d594628e84 Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Sat, 11 Jun 2022 14:21:18 -0700 Subject: [PATCH] [MAD Input] Initialize state variable, fix crash This should prevent a crash if the input is recycled for another file, which would cause the output buffer to be freed, but the output size to contain a count on first call to readAudio, which would cause a memory access crash. Possibly fixes #269 Signed-off-by: Christopher Snowhill --- Plugins/MAD/MADDecoder.m | 1 + 1 file changed, 1 insertion(+) diff --git a/Plugins/MAD/MADDecoder.m b/Plugins/MAD/MADDecoder.m index f46f6e6f8..262155a14 100644 --- a/Plugins/MAD/MADDecoder.m +++ b/Plugins/MAD/MADDecoder.m @@ -387,6 +387,7 @@ mad_synth_init(&_synth); _firstFrame = YES; + _outputFrames = 0; // DLog(@"OPEN: %i", _firstFrame); inputEOF = NO;