History

fix parseonly issues when bs is very large

huili2 committed 10 years ago

Commit e6a6b091 parent 6ba85392 files · +49 −6Browse files

Showing the changes to codec/decoder/plus/src/welsDecoderExt.cpp (1 of 2 files). Show all

Unified · Split

codec/decoder/plus/src/welsDecoderExt.cpp+10−2
@@ -458,7 +458,10 @@ DECODING_STATE CWelsDecoder::DecodeFrame2 (const unsigned char* kpSrc, · 457 unmodified lines
458 return dsInvalidArgument;458 return dsInvalidArgument;
459 }459 }
460 if (CheckBsBuffer (m_pDecContext, kiSrcLen)) {460 if (CheckBsBuffer (m_pDecContext, kiSrcLen)) {
461 return dsOutOfMemory;461 if (ResetDecoder())
462 return dsOutOfMemory;
463
464 return dsErrorFree;
462 }465 }
463 if (kiSrcLen > 0 && kpSrc != NULL) {466 if (kiSrcLen > 0 && kpSrc != NULL) {
464#ifdef OUTPUT_BIT_STREAM467#ifdef OUTPUT_BIT_STREAM
@@ -513,6 +516,8 @@ DECODING_STATE CWelsDecoder::DecodeFrame2 (const unsigned char* kpSrc, · 48 unmodified lines
513 if (m_pDecContext->iErrorCode & dsOutOfMemory) {516 if (m_pDecContext->iErrorCode & dsOutOfMemory) {
514 if (ResetDecoder())517 if (ResetDecoder())
515 return dsOutOfMemory;518 return dsOutOfMemory;
519
520 return dsErrorFree;
516 }521 }
517 //for AVC bitstream (excluding AVC with temporal scalability, including TP), as long as error occur, SHOULD notify upper layer key frame loss.522 //for AVC bitstream (excluding AVC with temporal scalability, including TP), as long as error occur, SHOULD notify upper layer key frame loss.
518 if ((IS_PARAM_SETS_NALS (eNalType) || NAL_UNIT_CODED_SLICE_IDR == eNalType) ||523 if ((IS_PARAM_SETS_NALS (eNalType) || NAL_UNIT_CODED_SLICE_IDR == eNalType) ||
@@ -611,7 +616,10 @@ DECODING_STATE CWelsDecoder::DecodeParser (const unsigned char* kpSrc, · 92 unmodified lines
611 return dsInvalidArgument;616 return dsInvalidArgument;
612 }617 }
613 if (CheckBsBuffer (m_pDecContext, kiSrcLen)) {618 if (CheckBsBuffer (m_pDecContext, kiSrcLen)) {
614 return dsOutOfMemory;619 if (ResetDecoder())
620 return dsOutOfMemory;
621
622 return dsErrorFree;
615 }623 }
616 if (kiSrcLen > 0 && kpSrc != NULL) {624 if (kiSrcLen > 0 && kpSrc != NULL) {
617#ifdef OUTPUT_BITSTREAM625#ifdef OUTPUT_BITSTREAM

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t