mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-30 07:26:53 +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)
|
void h264GeFramerate(T_SPS *ptSps, float *pfFramerate)
|
||||||
{
|
{
|
||||||
int iFrInt = 0;
|
|
||||||
if(ptSps->iTimingInfoPresentFlag)
|
if(ptSps->iTimingInfoPresentFlag)
|
||||||
{
|
{
|
||||||
if(!ptSps->iFixedFrameRateFlag)
|
*pfFramerate = (float)ptSps->u32TimeScale / (float)ptSps->u32NumUnitsInTick / 2.0;
|
||||||
{
|
}else{
|
||||||
*pfFramerate = (float)ptSps->u32TimeScale / (float)ptSps->u32NumUnitsInTick;
|
*pfFramerate = 0;
|
||||||
//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;
|
|
||||||
}
|
}
|
||||||
switch(iFrInt)
|
switch((int)*pfFramerate)
|
||||||
{
|
{
|
||||||
case 23:// 23.98
|
case 23:// 23.98
|
||||||
RPT(RPT_DBG, "frame rate:23.98");
|
RPT(RPT_DBG, "frame rate:23.98");
|
||||||
|
Loading…
Reference in New Issue
Block a user