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