mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +01:00
audio/vorbis: Catch the Seek error
This commit is contained in:
parent
fc5970768d
commit
11e76d3fc8
@ -106,7 +106,9 @@ func (d *decoded) Seek(offset int64, whence int) (int64, error) {
|
||||
// pos should be always even
|
||||
next = next / 2 * 2
|
||||
d.posInBytes = int(next)
|
||||
d.decoder.SetPosition(next / int64(d.decoder.Channels()) / 2)
|
||||
if err := d.decoder.SetPosition(next / int64(d.decoder.Channels()) / 2); err != nil {
|
||||
return 0, err
|
||||
}
|
||||
d.decoderr = nil
|
||||
return next, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user