[datatype-dev] CR: Streaming mp4 audio clip skips some parts - The "System: out of memory" when streaming an only audio clip with high bitrate
ext-saleem.adookkattil at nokia.com ext-saleem.adookkattil at nokia.com"Nokia submits this code under the terms of a commercial contribution agreement with RealNetworks, and I am authorized to contribute this code under said agreement." > Modified by: ext-saleem.adookkattil at nokia.com > > Reviewed by: > > Date: 09-Sep-2007 > > Project: SymbianMmf_Rel > > TSW: ECTN-75PTCS > > Synopsis: Fix to correct MP4LATM staged buffer size calculation and > memory release failure on MP4LATMDepack::OnPack method call failure. > > Overview: > > Finding memory release failure when streaming certain mp4 audio only > clip with high bitrates. The root cause of the problem is that > MP4LATMDepack object failed to calculate staged buffer size and this > failure causes the OnPack method of MP4LATMDepack failure. Exiting > code failed to release the payload packet buffer upon OnPack failure. > > Files Modified: > > /cvsroot/datatype/mp4/payload/mp4-latm-depack.cpp > /cvsroot/datatype/mp4/payload/mp4apyld.cpp > > Image Size and Heap Use impact: No > > Module Release testing (STIF) : Pass > > Test case(s) Added : No > > Memory leak check performed : No new leaks introduced. > > Platforms and Profiles Build Verified: > Profile -> helix-client-s60-32-mmf-mdf-arm > BIF branch -> helix_restricted > SYSTEM_ID -> symbian-91-armv5, symbian-91-winscw-emulator > Target -> symbianMmf_rel > > Platforms and Profiles Functionality verified: armv5, winscw > > Branch: 210CayS > > Index: mp4-latm-depack.cpp > =================================================================== > RCS file: /cvsroot/datatype/mp4/payload/mp4-latm-depack.cpp,v > retrieving revision 1.8.2.2 > diff -u -w -r1.8.2.2 mp4-latm-depack.cpp > --- mp4-latm-depack.cpp 13 Jul 2006 17:38:15 -0000 1.8.2.2 > +++ mp4-latm-depack.cpp 12 Sep 2007 19:30:27 -0000 > @@ -197,6 +197,7 @@ > m_ulBytesStaged += ulSize; > > pBuffer = m_pStagingBuf; > + ulSize = m_ulBytesStaged; > } > > if (bMarker) > @@ -304,15 +305,16 @@ > if (m_muxConfig.GetStream(streamID).GetLengthType() == > 0) > { > ULONG32 tmp; > - > + ULONG32 SizeByteCount = 0; > m_pSlotLengths[streamID] = 0; > > do > { > tmp = bs.GetBits(8); > + SizeByteCount++; > m_pSlotLengths[streamID] += tmp; > } while (tmp == 0xff); > - if (m_pSlotLengths[streamID] > bs.GetBufSize()) > + if (m_pSlotLengths[streamID] + SizeByteCount > > bs.GetBufSize()) > { > failed = TRUE; > } > > > Index: mp4apyld.cpp > =================================================================== > RCS file: /cvsroot/datatype/mp4/payload/mp4apyld.cpp,v > retrieving revision 1.14 > diff -u -w -r1.14 mp4apyld.cpp > --- mp4apyld.cpp 2 Sep 2005 18:55:34 -0000 1.14 > +++ mp4apyld.cpp 12 Sep 2007 18:21:00 -0000 > @@ -653,13 +653,15 @@ > { > IHXBuffer* pBuffer = pPacket->GetBuffer(); > > - if (pBuffer && > - m_pLATMDepack->OnPacket(GetPacketTime(pPacket), > + if (pBuffer) > + { > + if (m_pLATMDepack->OnPacket(GetPacketTime(pPacket), > pBuffer->GetBuffer(), > pBuffer->GetSize(), > > (pPacket->GetASMRuleNumber() % 2 == 1))) > { > retVal = HXR_OK; > + } > > pBuffer->Release(); > } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.helixcommunity.org/pipermail/datatype-dev/attachments/20070912/d627e250/attachment-0001.html