mirror of
https://github.com/mpv-player/mpv
synced 2025-02-18 13:47:04 +00: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);
|
int sstride = channels.num * af_fmt_to_bytes(format);
|
||||||
p->outburst -= p->outburst % ao->period_size; // round down
|
p->outburst -= p->outburst % sstride; // round down
|
||||||
|
ao->period_size = p->outburst / sstride;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user