shithub: openh264

Download patch

ref: 151a7ff643453d6b9c25b480c8b1d218929c7f06
parent: 84a7669b637bac097519031fb1da11163be38076
parent: 8537a9274dd2d356bf0c8d8d3d918d3b1d7b7d8e
author: HaiboZhu <haibozhu@cisco.com>
date: Wed Jun 15 06:23:38 EDT 2016

Merge pull request #2490 from sijchen/refactor_ref4

[Encoder] refactor: to avoid only use idx0 in syntax writing, for now it has no impact on bs

--- a/codec/encoder/core/src/ref_list_mgr_svc.cpp
+++ b/codec/encoder/core/src/ref_list_mgr_svc.cpp
@@ -663,9 +663,12 @@
         pRefReorder->SReorderingSyntax[0].uiAbsDiffPicNumMinus1 = iAbsDiffPicNumMinus1;
         pRefReorder->SReorderingSyntax[1].uiReorderingOfPicNumsIdc = 3;
       } else {
-        pRefReorder->SReorderingSyntax[0].uiReorderingOfPicNumsIdc = 2;
-        pRefReorder->SReorderingSyntax[0].iLongTermPicNum = pCtx->pRefList0[0]->iLongTermPicNum;
-        pRefReorder->SReorderingSyntax[1].uiReorderingOfPicNumsIdc = 3;
+        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[iRefIdx].uiReorderingOfPicNumsIdc = 3;
       }
     }