From 53209485c0fc22c5fe007ce5309ae894fa132fcc Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Sat, 26 Feb 2022 01:38:17 -0800 Subject: [PATCH] MAD Decoder: Correctly prepare buffer after free The current buffer size argument is used to determine if a buffer should be allocated on the next run. Just in case something reuses the same decoder instance. 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 621b3e55f..82e77bbb3 100644 --- a/Plugins/MAD/MADDecoder.m +++ b/Plugins/MAD/MADDecoder.m @@ -631,6 +631,7 @@ if(_outputBuffer) { free(_outputBuffer); _outputBuffer = NULL; + _currentOutputFrames = 0; } mad_synth_finish(&_synth);