mirror of
https://github.com/mpv-player/mpv.git
synced 2024-09-20 03:52:22 +02:00
ao_oss: fix a dumb calculation
period_size used the wrong unit, and even if the unit had been correct, was assigned the wrong value. Probably fixes #4642.
This commit is contained in:
parent
f676f6d2b9
commit
8c82555e41
@ -387,8 +387,9 @@ static int reopen_device(struct ao *ao, bool allow_format_changes)
|
||||
}
|
||||
}
|
||||
|
||||
ao->period_size = channels.num * af_fmt_to_bytes(format);
|
||||
p->outburst -= p->outburst % ao->period_size; // round down
|
||||
int sstride = channels.num * af_fmt_to_bytes(format);
|
||||
p->outburst -= p->outburst % sstride; // round down
|
||||
ao->period_size = p->outburst / sstride;
|
||||
|
||||
return 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user