shithub: openh264

Download patch

ref: ea99af883cee48185eda14aeae5fde3050da2c43
parent: a1406d55b6ef9ae1daf4f9f2dc2332dbf83a91b8
author: xiaotiansf <[email protected]>
date: Wed Feb 6 11:02:54 EST 2019

Fix Bugzilla reported bug 1522172_2 (second test case) and 1535089.

--- a/codec/decoder/core/src/manage_dec_ref.cpp
+++ b/codec/decoder/core/src/manage_dec_ref.cpp
@@ -79,6 +79,10 @@
     pRef->uiSpatialId = -1;
     pRef->iSpsId = -1;
     pRef->bIsComplete = false;
+    for (int32_t i = 0; i < MAX_DPB_COUNT; ++i) {
+      pRef->pRefPic[LIST_0][i] = NULL;
+      pRef->pRefPic[LIST_1][i] = NULL;
+    }
   }
 }
 
--- a/codec/decoder/plus/src/welsDecoderExt.cpp
+++ b/codec/decoder/plus/src/welsDecoderExt.cpp
@@ -583,7 +583,7 @@
 
     if ((m_pDecContext->iErrorCode & dsRefLost) && m_pDecContext->eSliceType == B_SLICE) {
       if (ResetDecoder())
-        return dsOutOfMemory;
+        return dsRefLost;
 
       return dsErrorFree;
     }