Skip to content

Commit

Permalink
Fix overflow exporting to CUE sheet
Browse files Browse the repository at this point in the history
  • Loading branch information
fengalin committed Mar 28, 2020
1 parent 8a4aec9 commit cd88c58
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions metadata/src/cue_sheet_format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,10 @@ impl Writer for CueSheetFormat {
" INDEX 01 {:02}:{:02}:{:02}\n",
start_ts.h * 60 + start_ts.m,
start_ts.s,
(f64::from((start_ts.ms * 1_000 + start_ts.us) * 1_000 + start_ts.nano)
/ 1_000_000_000f64
(f64::from(
(start_ts.ms as u32 * 1_000 + start_ts.us as u32) * 1_000
+ start_ts.nano as u32
) / 1_000_000_000f64
* 75f64)
.round() // frame nb (75 frames/s for Cue Sheets)
);
Expand Down

0 comments on commit cd88c58

Please sign in to comment.