mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-24 11:54:01 +00:00
chapters/dvd: increase timestamp precision
matroska / xml can store more precise timestamps.
This commit is contained in:
parent
56ea93ab41
commit
f8a5c1dbad
@ -93,14 +93,14 @@ parse_dvd(std::string const &file_name) {
|
||||
cur_frames += ((dt->frame_u & 0x30) >> 4) * 10 + (dt->frame_u & 0x0f);
|
||||
}
|
||||
|
||||
auto factor = fps == 30 ? 1001ull : 1000ull;
|
||||
timestamps.emplace_back(timestamp_c::ms(factor * overall_frames / fps));
|
||||
auto factor = fps == 30 ? 1001 : 1000;
|
||||
timestamps.emplace_back(timestamp_c::ns(1000000ull * factor * overall_frames / fps));
|
||||
|
||||
overall_frames += cur_frames;
|
||||
}
|
||||
|
||||
auto factor = fps == 30 ? 1001ull : 1000ull;
|
||||
timestamps.emplace_back(timestamp_c::ms(factor * overall_frames / fps));
|
||||
auto factor = fps == 30 ? 1001 : 1000;
|
||||
timestamps.emplace_back(timestamp_c::ns(1000000ull * factor * overall_frames / fps));
|
||||
}
|
||||
|
||||
return titles_and_timestamps;
|
||||
|
Loading…
Reference in New Issue
Block a user