shithub: openh264

Download patch

ref: 3e120501926644634fa5af8ebadfa822acfb29c7
parent: 6482d7b9cde9051607964b77758837f93141457a
parent: cbe5acfbab50a1f6174cace440d5ad111d82aeec
author: huili2 <huili2@cisco.com>
date: Wed Jul 24 10:39:26 EDT 2019

Merge pull request #3155 from xiaotiansf/Bugzilla

re-fix oss-buzz bug 14423.

--- a/codec/decoder/core/src/decoder.cpp
+++ b/codec/decoder/core/src/decoder.cpp
@@ -210,22 +210,12 @@
   }
 
   //update references due to allocation changes
+  //all references' references have to be reset oss-buzz 14423
   for (int32_t i = 0; i < kiNewSize; i++) {
     for (int32_t listIdx = LIST_0; listIdx < LIST_A; ++listIdx) {
       int32_t j = -1;
       while (++j < MAX_DPB_COUNT && pPicNewBuf->ppPic[i]->pRefPic[listIdx][j] != NULL) {
-        unsigned long long uiTimeStamp = pPicNewBuf->ppPic[i]->pRefPic[listIdx][j]->uiTimeStamp;
-        bool foundThePic = false;
-        for (int32_t k = 0; k < kiNewSize; k++) {
-          if (pPicNewBuf->ppPic[k]->uiTimeStamp == uiTimeStamp) {
-            pPicNewBuf->ppPic[i]->pRefPic[listIdx][j] = pPicNewBuf->ppPic[k];
-            foundThePic = true;
-            break;
-          }
-        }
-        if (!foundThePic) {
-          pPicNewBuf->ppPic[i]->pRefPic[listIdx][j] = NULL;
-        }
+        pPicNewBuf->ppPic[i]->pRefPic[listIdx][j] = NULL;
       }
     }
   }