shithub: openh264

Download patch

ref: a9601cdc590a442cfb8da57644ad43b7b1368882
parent: c29da290b9ef745749e692b7aba4025cd7c33115
author: sijchen@cisco.com <sijchen@cisco.com>
date: Fri May 27 13:07:19 EDT 2016

refactor to avoid only use idx0 in syntax writing, for now it has no impact on bs, may benefit future usage

--- a/codec/encoder/core/src/ref_list_mgr_svc.cpp
+++ b/codec/encoder/core/src/ref_list_mgr_svc.cpp
@@ -663,8 +663,11 @@
         pRefReorder->SReorderingSyntax[0].uiAbsDiffPicNumMinus1 = iAbsDiffPicNumMinus1;
         pRefReorder->SReorderingSyntax[1].uiReorderingOfPicNumsIdc = 3;
       } else {
-        pRefReorder->SReorderingSyntax[0].uiReorderingOfPicNumsIdc = 2;
-        pRefReorder->SReorderingSyntax[0].iLongTermPicNum = pCtx->pRefList0[0]->iLongTermPicNum;
+        int32_t iRefIdx = 0;
+        for (iRefIdx = 0; iRefIdx < pCtx->iNumRef0; iRefIdx++) {
+          pRefReorder->SReorderingSyntax[iRefIdx].uiReorderingOfPicNumsIdc = 2;
+          pRefReorder->SReorderingSyntax[iRefIdx].iLongTermPicNum = pCtx->pRefList0[iRefIdx]->iLongTermPicNum;
+        }
         pRefReorder->SReorderingSyntax[1].uiReorderingOfPicNumsIdc = 3;
       }
     }