mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2025-01-13 05:31:44 +00:00
Avoid underflow/wrap around
This commit is contained in:
parent
787339f03a
commit
d439f5894c
@ -1036,7 +1036,7 @@ mpeg_ts_reader_c::send_to_packetizer(int tid) {
|
||||
|
||||
//if (tid == 0)
|
||||
// m_file->write(tracks[tid]->payload->get_buffer(), tracks[tid]->payload_size);
|
||||
if (tracks[tid]->timecode - m_global_timecode_offset < 0)
|
||||
if (tracks[tid]->timecode < m_global_timecode_offset)
|
||||
tracks[tid]->timecode = 0;
|
||||
else
|
||||
tracks[tid]->timecode = (uint64_t)(tracks[tid]->timecode - m_global_timecode_offset) * 100000ll / 9;
|
||||
|
Loading…
Reference in New Issue
Block a user