Skip to content

Commit

Permalink
Merge pull request #673 from kszaq/Matrix-hevc_frame_rate
Browse files Browse the repository at this point in the history
HEVC: Use constant frame rate if average is 0
  • Loading branch information
glennguy authored May 7, 2021
2 parents 51f7280 + f904870 commit 99d72cd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 99d72cd

Please sign in to comment.