fix typo
Showing the changes to codec/encoder/plus/src/welsEncoderExt.cpp (1 of 4 files). Show all
Unified · Split
| @@ -508,11 +508,28 @@ int32_t CWelsH264SVCEncoder::RawData2SrcPic (const uint8_t* pSrc) { · 507 unmodified lines | |||
| 508 | */ | 508 | */ |
| 509 | int CWelsH264SVCEncoder::EncodeFrame (const SSourcePicture* kpSrcPic, SFrameBSInfo* pBsInfo) { | 509 | int CWelsH264SVCEncoder::EncodeFrame (const SSourcePicture* kpSrcPic, SFrameBSInfo* pBsInfo) { |
| 510 | if (! (kpSrcPic && m_pEncContext && m_bInitialFlag)) { | 510 | if (! (kpSrcPic && m_pEncContext && m_bInitialFlag)) { |
| 511 | return videoFrameTypeInvalid; | 511 | return cmInitParaError; |
| 512 | } | ||
| 513 | |||
| 514 | const int32_t kiEncoderReturn = EncodeFrameInternal(kpSrcPic, pBsInfo); | ||
| 515 | |||
| 516 | switch (kiEncoderReturn) { | ||
| 517 | case ENC_RETURN_MEMALLOCERR: | ||
| 518 | WelsUninitEncoderExt (&m_pEncContext); | ||
| 519 | return cmMallocMemeError; | ||
| 520 | case ENC_RETURN_SUCCESS: | ||
| 521 | case ENC_RETURN_CORRECTED: | ||
| 522 | break;//continue processing | ||
| 523 | case ENC_RETURN_UNSUPPORTED_PARA: | ||
| 524 | return cmUnsupportedData; | ||
| 525 | break; | ||
| 526 | case ENC_RETURN_UNEXPECTED: | ||
| 527 | return cmUnkonwReason; | ||
| 528 | default: | ||
| 529 | WelsLog (m_pEncContext, WELS_LOG_ERROR, "unexpected return(%d) from WelsEncoderEncodeExt()!\n", kiEncoderReturn); | ||
| 530 | return cmUnkonwReason; | ||
| 512 | } | 531 | } |
| 513 | 532 | ||
| 514 | int32_t uiFrameType = videoFrameTypeInvalid; | ||
| 515 | uiFrameType = EncodeFrameInternal(kpSrcPic, pBsInfo); | ||
| 516 | 533 | ||
| 517 | #ifdef REC_FRAME_COUNT | 534 | #ifdef REC_FRAME_COUNT |
| 518 | ++ m_uiCountFrameNum; | 535 | ++ m_uiCountFrameNum; |
| @@ -524,7 +541,7 @@ int CWelsH264SVCEncoder::EncodeFrame (const SSourcePicture* kpSrcPic, SFrameBSIn · 5 unmodified lines | |||
| 524 | DumpSrcPicture (pSrc); | 541 | DumpSrcPicture (pSrc); |
| 525 | #endif // DUMP_SRC_PICTURE | 542 | #endif // DUMP_SRC_PICTURE |
| 526 | 543 | ||
| 527 | return uiFrameType; | 544 | return cmResultSuccess; |
| 528 | } | 545 | } |
| 529 | 546 | ||
| 530 | 547 | ||