shithub: openh264

Download patch

ref: 65dcd57c1b91d260cd1520821263b0ded8461547
parent: 26ccd837f19c76326780ff498720703c9c67bf8e
parent: 7ee00b0618bd6b4ef7fcba60c4d96c22d39c7c1d
author: huili2 <huili2@cisco.com>
date: Mon Dec 29 11:58:26 EST 2014

Merge pull request #1679 from HaiboZhu/Debug_Crash_1115349_AU_StartPos_Not_Reset

Reset AU start pos to 0 after construct AU

--- a/codec/decoder/core/src/decoder_core.cpp
+++ b/codec/decoder/core/src/decoder_core.cpp
@@ -1290,7 +1290,7 @@
 
 void ResetCurrentAccessUnit (PWelsDecoderContext pCtx) {
   PAccessUnit pCurAu = pCtx->pAccessUnitList;
-
+  pCurAu->uiStartPos            = 0;
   pCurAu->uiEndPos		= 0;
   pCurAu->bCompletedAuFlag	= false;
   if (pCurAu->uiActualUnitsNum > 0) {
@@ -1335,6 +1335,7 @@
   else
     pAu->uiAvailUnitsNum	= 0;
   pAu->uiActualUnitsNum	= 0;
+  pAu->uiStartPos       = 0;
   pAu->uiEndPos		= 0;
   pAu->bCompletedAuFlag	= false;
 }
--- a/codec/decoder/core/src/memmgr_nal_unit.cpp
+++ b/codec/decoder/core/src/memmgr_nal_unit.cpp
@@ -75,7 +75,8 @@
   (*ppAu)->uiCountUnitsNum	= kuiSize;
   (*ppAu)->uiAvailUnitsNum	= 0;
   (*ppAu)->uiActualUnitsNum	= 0;
-  (*ppAu)->uiEndPos		    = 0;
+  (*ppAu)->uiStartPos           = 0;
+  (*ppAu)->uiEndPos		= 0;
   (*ppAu)->bCompletedAuFlag	= false;
 
   return 0;