Merge branch 'viv/inf_spf' of cinnabon/rustro into matriarch

This commit is contained in:
Vivian Lim 2019-12-24 05:27:09 +00:00 committed by Gitea
commit 801896cff6
1 changed files with 1 additions and 1 deletions

View File

@ -158,7 +158,7 @@ impl MyEmulator {
// similar hack to the sample rate, make sure we don't divide by zero.
let mut spf = 1.0 / self.av_info.timing.fps;
if spf.is_nan() {
if spf.is_nan() || spf.is_infinite() {
spf = 1.0 / 60.0;
}
Duration::from_secs_f64(spf)