fix the GetOption: bit rate part

This commit is contained in:
sijchen 2014-04-21 16:32:16 +08:00
parent 3f2ea77908
commit 736a6753c0

View File

@ -935,7 +935,7 @@ int CWelsH264SVCEncoder::GetOption (ENCODER_OPTION eOptionId, void* pOption) {
m_uiCountFrameNum, m_iCspInternal);
#endif//REC_FRAME_COUNT
SBitrateInfo*pInfo = (static_cast<SBitrateInfo *>(pOption));
if((pInfo->iLayer!=SPATIAL_LAYER_ALL)||(pInfo->iLayer!=SPATIAL_LAYER_0)||(pInfo->iLayer!=SPATIAL_LAYER_1)||(pInfo->iLayer!=SPATIAL_LAYER_2)||(pInfo->iLayer!=SPATIAL_LAYER_3))
if((pInfo->iLayer!=SPATIAL_LAYER_ALL)&&(pInfo->iLayer!=SPATIAL_LAYER_0)&&(pInfo->iLayer!=SPATIAL_LAYER_1)&&(pInfo->iLayer!=SPATIAL_LAYER_2)&&(pInfo->iLayer!=SPATIAL_LAYER_3))
return cmInitParaError;
if(pInfo->iLayer == SPATIAL_LAYER_ALL){
pInfo->iBitrate = m_pEncContext->pSvcParam->iTargetBitrate;
@ -950,7 +950,7 @@ int CWelsH264SVCEncoder::GetOption (ENCODER_OPTION eOptionId, void* pOption) {
m_uiCountFrameNum, m_iCspInternal);
#endif//REC_FRAME_COUNT
SBitrateInfo*pInfo = (static_cast<SBitrateInfo *>(pOption));
if((pInfo->iLayer!=SPATIAL_LAYER_ALL)||(pInfo->iLayer!=SPATIAL_LAYER_0)||(pInfo->iLayer!=SPATIAL_LAYER_1)||(pInfo->iLayer!=SPATIAL_LAYER_2)||(pInfo->iLayer!=SPATIAL_LAYER_3))
if((pInfo->iLayer!=SPATIAL_LAYER_ALL)&&(pInfo->iLayer!=SPATIAL_LAYER_0)&&(pInfo->iLayer!=SPATIAL_LAYER_1)&&(pInfo->iLayer!=SPATIAL_LAYER_2)&&(pInfo->iLayer!=SPATIAL_LAYER_3))
return cmInitParaError;
if(pInfo->iLayer == SPATIAL_LAYER_ALL){
pInfo->iBitrate = m_pEncContext->pSvcParam->iMaxBitrate;