diff --git a/NEWS.md b/NEWS.md index 4ef4f0638..fe29acac7 100644 --- a/NEWS.md +++ b/NEWS.md @@ -6,6 +6,9 @@ extraction as other tools such as MP4Box cannot handle them correctly. Implements #2293. * mkvmerge, mkvextract: AVC/h.264: empty NALUs will now be removed. +* mkvmerge: MP4 reader: improved the detection of edit lists consisting of two + identical entries, each spanning the file's duration as given in the movie + header atom. The second entry is ignored in such cases. See #2306. ## Bug fixes diff --git a/src/input/r_qtmp4.cpp b/src/input/r_qtmp4.cpp index 7344ec626..dda999d2c 100644 --- a/src/input/r_qtmp4.cpp +++ b/src/input/r_qtmp4.cpp @@ -2451,10 +2451,9 @@ qtmp4_demuxer_c::apply_edit_list() { edit.segment_duration = 0; mxdebug_if(m_debug_editlists, boost::format(" %1%: single edit with positive media_time; track start offset %2%; change to non-edit to copy the rest\n") % info % format_timestamp(timeline_cts)); - } else if ( (num_edits == 2) - && (entry_index == 2) - && (edit == editlist_table.front()) - && (edit.media_time == 0) + } else if ( (num_edits == 2) + && (entry_index == 2) + && (edit == editlist_table.front()) && m_reader.m_duration && ((timeline_cts - static_cast(*m_reader.m_duration)) >= timestamp_c::s(-60).to_ns())) { mxdebug_if(m_debug_editlists,