[prev in list] [next in list] [prev in thread] [next in thread]
List: helix-datatype-cvs
Subject: [Datatype-cvs] mp4/payload mp4apyld.cpp, 1.14.14.1.22.4, 1.14.14.1.22.4.32.1
From: henryxing () helixcommunity ! org
Date: 2012-12-19 10:38:24
[Download RAW message or body]
Update of /cvsroot/datatype/mp4/payload
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv6308
Modified Files:
Tag: hxclient_5_0_1_hebe
mp4apyld.cpp
Log Message:
hxc260 fix the crash issue of discontinuity hls url on 161.105.176.25
Index: mp4apyld.cpp
===================================================================
RCS file: /cvsroot/datatype/mp4/payload/mp4apyld.cpp,v
retrieving revision 1.14.14.1.22.4
retrieving revision 1.14.14.1.22.4.32.1
diff -u -d -r1.14.14.1.22.4 -r1.14.14.1.22.4.32.1
--- mp4apyld.cpp 27 Oct 2011 07:45:25 -0000 1.14.14.1.22.4
+++ mp4apyld.cpp 19 Dec 2012 10:38:16 -0000 1.14.14.1.22.4.32.1
@@ -104,6 +104,7 @@
, m_uADTSCurSamplingFreIndex(0)
, m_uADTSCurProfile(0)
, m_bADTSFirstPacket(TRUE)
+ , m_ulDiscontinuityTS(0)
{
;
}
@@ -1064,12 +1065,25 @@
m_bPriorLoss = FALSE;
}
+ //if meet the discontinuity tag, adts packet offset was reset to 0
+ UINT32 ulPktTime = pPacket->GetTime();
+ if (ucASMFlags & HX_ASM_DISCONTINUITY && m_ulDiscontinuityTS != \
ulPktTime) + {
+ m_ulDiscontinuityTS = ulPktTime;
+ m_ulADTSCurrentPacketOffset = 0;
+ }
// ADTS AUs can be aggregated into one packets
// we'll extract one AU here
+ UINT32 ulBufSize = pBuffer->GetSize();
+ UINT32 ulSize = ulBufSize - m_ulADTSCurrentPacketOffset;
UINT8* pAU = pBuffer->GetBuffer() + m_ulADTSCurrentPacketOffset;
- UINT32 ulSize = pBuffer->GetSize() - m_ulADTSCurrentPacketOffset;
-
- if (pAU[0] != 0xFF || (pAU[1] & 0xF0) != 0xF0 || ulSize < 7)
+ if (ulBufSize < m_ulADTSCurrentPacketOffset)
+ {
+ //meet some problems if m_ulADTSCurrentPacketOffset is bigger \
than ulBufSize, currently also treat it as lost + m_bPriorLoss = \
TRUE; + retVal = HXR_INCOMPLETE;
+ }
+ else if(pAU[0] != 0xFF || (pAU[1] & 0xF0) != 0xF0 || ulSize < 7)
{
//error, treat the packet as lost
m_bPriorLoss = TRUE;
_______________________________________________
Datatype-cvs mailing list
Datatype-cvs@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/datatype-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic