Fix gapless playback

This commit is contained in:
Roderick van Domburg 2022-01-06 22:11:53 +01:00
parent 8d74d48809
commit 67ae0fcf8d
No known key found for this signature in database
GPG key ID: A9EF5222A26F0451

View file

@ -1104,6 +1104,8 @@ impl Future for PlayerInternal {
match decoder.next_packet() {
Ok(result) => {
if let Some((new_stream_position_ms, ref packet)) = result {
*stream_position_ms = new_stream_position_ms;
if !passthrough {
match packet.samples() {
Ok(_) => {
@ -1144,9 +1146,6 @@ impl Future for PlayerInternal {
})
}
}
} else {
// position, even if irrelevant, must be set so that seek() is called
*stream_position_ms = new_stream_position_ms;
}
}