From dc163cc4d5a90ab8522a1766a8b0456ff7bae734 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Sat, 18 May 2019 10:40:35 +0200 Subject: [PATCH] AV1: use container timing info if no bitstream timing info present Fixes #2553. --- NEWS.md | 2 ++ src/output/p_av1.cpp | 4 +++- tests/results.txt | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/NEWS.md b/NEWS.md index bc31b7f34..e597892b7 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,6 +4,8 @@ * mkvmerge: all subtitle frames are now treated as key frames in order to fix wrong data in source files. Fixes #2541. +* mkvmerge: AV1: fixed frame timestamp calculation when reading bitstreams + that lack timing information from IVF files. Fixes #2553. # Version 33.1.0 "Primrose" 2019-04-15 diff --git a/src/output/p_av1.cpp b/src/output/p_av1.cpp index c18bd2b54..96c37b5ef 100644 --- a/src/output/p_av1.cpp +++ b/src/output/p_av1.cpp @@ -68,7 +68,9 @@ av1_video_packetizer_c::set_header_parameters() { if ((m_htrack_default_duration <= 0) && frame_duration) { set_track_default_duration(boost::rational_cast(frame_duration)); need_to_rerender = true; - } + + } else if ((m_htrack_default_duration > 0) && !frame_duration) + m_parser.set_default_duration(m_htrack_default_duration); if (need_to_rerender) rerender_track_headers(); diff --git a/tests/results.txt b/tests/results.txt index 968999069..05392dbd0 100644 --- a/tests/results.txt +++ b/tests/results.txt @@ -483,7 +483,7 @@ T_634dialog_normalization_gain_removal:9a438e39ffa72c89a1e9ed940ecf6a0a-5c7588e4 T_635propedit_update_doc_type_version:181040794c0287a418f558e46d598b7d-1+1-4+1:passed:20180310-135142:0.138196579 T_636flac_with_id3_tags:c8b37897660d88038c4e6f401fe6c94c:passed:20180310-182917:0.204964643 T_637mp4_8_channels_in_track_headers_but_7_in_codec_specific_config:true:passed:20180322-222201:0.012853536 -T_638av1_ivf_webm:dc1b96c3c48ecda7b7da0b41a555af3f-c1050864ce2c49a80ef39bee50da870b-a5add2983081e735d6177c7c7f810e9d-f63ddb67079fdf2b9120e1f257c506c2-d12b160c887cb4061535dc0467bf9c1b-508dc51869e291813e77512a252d1e3b:passed:20180401-164905:0.057717643 +T_638av1_ivf_webm:98fd10950a728c44251794fe56b95333-c1050864ce2c49a80ef39bee50da870b-a5add2983081e735d6177c7c7f810e9d-1bd651b3fc5d3addb996a72a05b2986c-d12b160c887cb4061535dc0467bf9c1b-508dc51869e291813e77512a252d1e3b:passed:20180401-164905:0.057717643 T_639vobsub_missing_duration_in_matroska:1da346761ddede951b1f2f5f11cd3f69:passed:20180401-193013:0.014669303 T_640no_date:20fbba5a79a436caa36582e7675c1038:passed:20180427-231324:0.011724657 T_641keep_display_unit:f3c2b4b8f52f2d29025052a6be092451-3+16x9-2392d8546623ab6265c1cdbc1cab4739-0+123x456:passed:20180609-123022:0.062045824