Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 <kode54@gmail.com>
  • Loading branch information
kode54 committed Apr 20, 2022
1 parent 36d2d7b commit 299cc5a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Plugins/MAD/MADDecoder.m
Expand Up @@ -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;
Expand Down

0 comments on commit 299cc5a

Please sign in to comment.