Skip to content

Commit

Permalink
HEVC: Use constant frame rate if average is 0
Browse files Browse the repository at this point in the history
  • Loading branch information
kszaq committed May 6, 2021
1 parent 51f7280 commit f904870
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 f904870

Please sign in to comment.