fix bug where pos could move to before the beginning of the file

This commit is contained in:
Josh Coalson 2001-03-22 23:56:07 +00:00
parent 10cffdd2e7
commit 674653ffac
1 changed files with 2 additions and 0 deletions

View File

@ -453,6 +453,8 @@ bool seek_to_absolute_sample_(FLAC__FileDecoder *decoder, long filesize, uint64
}
if(pos < l)
pos = l;
if(pos < 0)
pos = 0;
last_frame_sample = this_frame_sample;
}
}