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 (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
458458 return dsInvalidArgument;
459459 }
460460 if (CheckBsBuffer (m_pDecContext, kiSrcLen)) {
461− return dsOutOfMemory;
461+ if (ResetDecoder())
462+ return dsOutOfMemory;
463+
464+ return dsErrorFree;
462465 }
463466 if (kiSrcLen > 0 && kpSrc != NULL) {
464467 #ifdef OUTPUT_BIT_STREAM
@@ -513,6 +516,8 @@ DECODING_STATE CWelsDecoder::DecodeFrame2 (const unsigned char* kpSrc, · 48 unmodified lines
513516 if (m_pDecContext->iErrorCode & dsOutOfMemory) {
514517 if (ResetDecoder())
515518 return dsOutOfMemory;
519+
520+ return dsErrorFree;
516521 }
517522 //for AVC bitstream (excluding AVC with temporal scalability, including TP), as long as error occur, SHOULD notify upper layer key frame loss.
518523 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
611616 return dsInvalidArgument;
612617 }
613618 if (CheckBsBuffer (m_pDecContext, kiSrcLen)) {
614− return dsOutOfMemory;
619+ if (ResetDecoder())
620+ return dsOutOfMemory;
621+
622+ return dsErrorFree;
615623 }
616624 if (kiSrcLen > 0 && kpSrc != NULL) {
617625 #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