Commit 819599ac by Dw9 Committed by GitHub

修复获取帧率逻辑 (#1293)

parent 741b197f
......@@ -2194,21 +2194,14 @@ int h264GetFormat(T_SPS *ptSps)
void h264GeFramerate(T_SPS *ptSps, float *pfFramerate)
{
int iFrInt = 0;
if(ptSps->iTimingInfoPresentFlag)
{
if(!ptSps->iFixedFrameRateFlag)
{
*pfFramerate = (float)ptSps->u32TimeScale / (float)ptSps->u32NumUnitsInTick;
//iFrInt = ptSps->vui_parameters.u32TimeScale / ptSps->vui_parameters.u32NumUnitsInTick;
}else
{
*pfFramerate = (float)ptSps->u32TimeScale / (float)ptSps->u32NumUnitsInTick / 2.0;
//iFrInt = ptSps->vui_parameters.u32TimeScale / ptSps->vui_parameters.u32NumUnitsInTick / 2;
}
iFrInt = ptSps->u32TimeScale / ptSps->u32NumUnitsInTick / 2;
*pfFramerate = (float)ptSps->u32TimeScale / (float)ptSps->u32NumUnitsInTick / 2.0;
}else{
*pfFramerate = 0;
}
switch(iFrInt)
switch((int)*pfFramerate)
{
case 23:// 23.98
RPT(RPT_DBG, "frame rate:23.98");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论