fix FLAC offset direction
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
DataHoarder 2022-07-27 16:40:44 +02:00
parent b42a1fee89
commit bae67a1c75
Signed by: DataHoarder
SSH key fingerprint: SHA256:OLTRf6Fl87G52SiR7sWLGNzlJt4WOX+tfI2yxo0z7xk

View file

@ -800,13 +800,13 @@ func (p *FLACPacket) GetDataOffset(offset int64) []byte {
number := int64(p.Number)
if offset != 0 {
if p.BlockingStrategy == 1 {
number += offset
number -= offset
if number < 0 {
return nil
}
} else {
number += offset / int64(p.hdr.MinimumBlockSize)
number -= offset / int64(p.hdr.MinimumBlockSize)
if number < 0 {
return nil