From f90487063bf7b61ca566b7b86b9089bf16633c40 Mon Sep 17 00:00:00 2001 From: kszaq <737984+kszaq@users.noreply.github.com> Date: Thu, 6 May 2021 23:25:37 +0200 Subject: [PATCH] HEVC: Use constant frame rate if average is 0 --- src/main.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 12657fb53..c5872d20a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -890,12 +890,18 @@ class ATTRIBUTE_HIDDEN HEVCCodecHandler : public CodecHandler AP4_DYNAMIC_CAST(AP4_HevcSampleDescription, sample_description)) { bool ret = false; - if (hevc->GetConstantFrameRate() && hevc->GetAverageFrameRate()) + if (hevc->GetAverageFrameRate()) { info.SetFpsRate(hevc->GetAverageFrameRate()); info.SetFpsScale(256); ret = true; } + else if (hevc->GetConstantFrameRate()) + { + info.SetFpsRate(hevc->GetConstantFrameRate()); + info.SetFpsScale(256); + ret = true; + } return ret; } }