From 299cc5a40695caf73d3afefcb2c8d93bc110c75e Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Tue, 19 Apr 2022 23:19:52 -0700 Subject: [PATCH] MAD Input: Possible further fix for seeking This is a possible fix for another gap issue I experienced, and may be exposed by seeking from the start of the file without decoding first. Signed-off-by: Christopher Snowhill --- Plugins/MAD/MADDecoder.m | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Plugins/MAD/MADDecoder.m b/Plugins/MAD/MADDecoder.m index f0975f6ee..db5418c6f 100644 --- a/Plugins/MAD/MADDecoder.m +++ b/Plugins/MAD/MADDecoder.m @@ -695,6 +695,12 @@ - (long)seek:(long)frame { framesToSkip = 0; + if(_foundLAMEHeader || _foundiTunSMPB) { + if(_framesDecoded < _startPadding) { + framesToSkip = _startPadding; + } + } + if(frame < _framesDecoded) { _framesDecoded = 0; _firstFrame = YES;