mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-23 03:10:04 +08:00
修复获取帧率逻辑 (#1293)
This commit is contained in:
parent
741b197f31
commit
819599ac25
@ -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;
|
||||
}else{
|
||||
*pfFramerate = 0;
|
||||
}
|
||||
iFrInt = ptSps->u32TimeScale / ptSps->u32NumUnitsInTick / 2;
|
||||
}
|
||||
switch(iFrInt)
|
||||
switch((int)*pfFramerate)
|
||||
{
|
||||
case 23:// 23.98
|
||||
RPT(RPT_DBG, "frame rate:23.98");
|
||||
|
Loading…
Reference in New Issue
Block a user