|
@@ -853,7 +853,17 @@ static OMX_ERRORTYPE InitEncoder(SF_OMX_COMPONENT *pSfOMXComponent)
|
|
|
config->encOpenParam.picWidth = pSfOMXComponent->portDefinition[0].format.video.nFrameWidth;
|
|
|
config->encOpenParam.picHeight = pSfOMXComponent->portDefinition[0].format.video.nFrameHeight;
|
|
|
config->encOpenParam.frameRateInfo = pSfOMXComponent->portDefinition[0].format.video.xFramerate;
|
|
|
- config->encOpenParam.bitRate = pSfOMXComponent->portDefinition[1].format.video.nBitrate;
|
|
|
+
|
|
|
+ if(pSfOMXComponent->portDefinition[1].format.video.nBitrate)
|
|
|
+ {
|
|
|
+ config->encOpenParam.rcEnable = 1;
|
|
|
+ config->encOpenParam.bitRate = pSfOMXComponent->portDefinition[1].format.video.nBitrate;
|
|
|
+ }
|
|
|
+ else if(config->encOpenParam.rcEnable == 1)
|
|
|
+ {
|
|
|
+ pSfOMXComponent->portDefinition[1].format.video.nBitrate = config->encOpenParam.bitRate;
|
|
|
+ }
|
|
|
+
|
|
|
if (pSfOMXComponent->bitFormat == STD_AVC)
|
|
|
{
|
|
|
config->encOpenParam.EncStdParam.waveParam.intraPeriod = pSfOMXComponent->AVCComponent[1].nPFrames;
|