shithub: openh264

Download patch

ref: a1406d55b6ef9ae1daf4f9f2dc2332dbf83a91b8
parent: 122d6a9f15f9bc46b295c0ccd66eb361ea2e897a
author: xiaotiansf <[email protected]>
date: Wed Feb 6 09:19:48 EST 2019

Refix Bugzilla reported bug 1525361 per huili's comment https://github.com/cisco/openh264/pull/3093

--- a/codec/decoder/core/src/decode_slice.cpp
+++ b/codec/decoder/core/src/decode_slice.cpp
@@ -2375,7 +2375,7 @@
     if (pCtx->bMbRefConcealed) {
       SLogContext* pLogCtx = & (pCtx->sLogCtx);
       WelsLog (pLogCtx, WELS_LOG_ERROR, "Ref Picture for B-Slice is lost, B-Slice decoding cannot be continued!");
-      return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_DATA, ERR_INFO_REFERENCE_PIC_LOST) | dsOutOfMemory;
+      return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_DATA, ERR_INFO_REFERENCE_PIC_LOST);
     }
     //predict iMv
     SubMbType subMbType;
--- a/codec/decoder/plus/src/welsDecoderExt.cpp
+++ b/codec/decoder/plus/src/welsDecoderExt.cpp
@@ -581,6 +581,12 @@
 
     eNalType = m_pDecContext->sCurNalHead.eNalUnitType;
 
+    if ((m_pDecContext->iErrorCode & dsRefLost) && m_pDecContext->eSliceType == B_SLICE) {
+      if (ResetDecoder())
+        return dsOutOfMemory;
+
+      return dsErrorFree;
+    }
     if (m_pDecContext->iErrorCode & dsOutOfMemory) {
       if (ResetDecoder())
         return dsOutOfMemory;