diff --git a/ChangeLog b/ChangeLog index 12d49eaf2..9c50923fb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2015-12-19 Moritz Bunkus + * mkvmerge: bug fix: the progress calculation was sometimes + outputting negative numbers when appending Matroska files whose + timestamps don't start at 0 (e.g. if they were created by + splitting with linking enabled). In the the GUI this resulted in + lines like "#GUI#progress -2%" in the job's output. + * mkvpropedit: new feature: added an option for removing all existing track statistics tags from a file. Part of the implementation of #1507. diff --git a/src/input/r_matroska.cpp b/src/input/r_matroska.cpp index 5e0fe75f3..54bb966a6 100644 --- a/src/input/r_matroska.cpp +++ b/src/input/r_matroska.cpp @@ -2230,7 +2230,7 @@ kax_reader_c::process_block_group(KaxCluster *cluster, int kax_reader_c::get_progress() { if (0 != m_segment_duration) - return (m_last_timecode - std::max(m_first_timecode, static_cast(0))) * 100 / m_segment_duration; + return std::min(m_last_timecode, m_segment_duration) * 100 / m_segment_duration; return 100 * m_in->getFilePointer() / m_size; }