Merge pull request #534 from ruil2/encoder_ret
fix bug that there is no output in encoder console
This commit is contained in:
commit
62be92cb08
@ -761,13 +761,13 @@ int ProcessEncodingSvcWithParam (ISVCEncoder* pPtrEnc, int argc, char** argv) {
|
||||
iStart = WelsTime();
|
||||
long iEncode = pPtrEnc->EncodeFrame (pSrcPic, &sFbi);
|
||||
iTotal += WelsTime() - iStart;
|
||||
if (videoFrameTypeInvalid == iEncode) {
|
||||
if (cmResultSuccess != iEncode) {
|
||||
fprintf (stderr, "EncodeFrame() failed: %ld.\n", iEncode);
|
||||
break;
|
||||
}
|
||||
|
||||
/* Write bit-stream */
|
||||
if (pFpBs != NULL && videoFrameTypeSkip != iEncode) { // file handler to write bit stream
|
||||
if (pFpBs != NULL && videoFrameTypeSkip != sFbi.eOutputFrameType) { // file handler to write bit stream
|
||||
int iLayer = 0;
|
||||
while (iLayer < sFbi.iLayerNum) {
|
||||
SLayerBSInfo* pLayerBsInfo = &sFbi.sLayerInfo[iLayer];
|
||||
@ -981,11 +981,11 @@ int ProcessEncodingSvcWithConfig (ISVCEncoder* pPtrEnc, int argc, char** argv) {
|
||||
iTotal += WelsTime() - iStart;
|
||||
|
||||
// fixed issue in case dismatch source picture introduced by frame skipped, 1/12/2010
|
||||
if (videoFrameTypeSkip == iEncFrames) {
|
||||
if (videoFrameTypeSkip == sFbi.eOutputFrameType) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (iEncFrames != videoFrameTypeInvalid && iEncFrames != videoFrameTypeSkip) {
|
||||
if (iEncFrames == cmResultSuccess) {
|
||||
int iLayer = 0;
|
||||
int iFrameSize = 0;
|
||||
while (iLayer < sFbi.iLayerNum) {
|
||||
|
@ -581,7 +581,7 @@ int CWelsH264SVCEncoder::EncodeFrameInternal(const SSourcePicture* pSrcPic, SFr
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
pBsInfo->eOutputFrameType = iFrameType;
|
||||
///////////////////for test
|
||||
#ifdef OUTPUT_BIT_STREAM
|
||||
if (iFrameType != videoFrameTypeInvalid && iFrameType != videoFrameTypeSkip) {
|
||||
|
Loading…
Reference in New Issue
Block a user