[prev in list] [next in list] [prev in thread] [next in thread] 

List:       helix-datatype-cvs
Subject:    [Datatype-cvs] mp4/payload h264pyld.cpp,1.9.2.6,1.9.2.7
From:       anugrahk () helixcommunity ! org
Date:       2010-03-29 6:38:39
Message-ID: 201003290639.o2T6dAdg024779 () mailer ! progressive-comp ! com
[Download RAW message or body]

Update of /cvsroot/datatype/mp4/payload
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv21434

Modified Files:
      Tag: hxclient_3_1_0_atlas
	h264pyld.cpp 
Log Message:
"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-debashis.2.panigrahi@nokia.com
 
Reviewed by: Junhong.Liu@nokia.com 
             ext Qiang Luo [qluo@real.com]
 
TSW Id: CPAY-82TEGE
 
Date: 03/23/2010
	 
Project: SymbianMmf_wm
 
Synopsis: Crash occurs after playing a 3gp video (Ovi Video_Main_704x528_3.0.3gp) for \
a while via Flash player  
Overview:
There are two problems with this stream:
1) Helix is getting unsupported/invalid NAL units in RTP payload (NAL types 0, 30 or \
31) which are getting ignored 2) In MTAP payload most of the times data that is \
coming is corrupted which is causing the panic.

In case of corrupted Multitime aggregate NAL packet ( NAL-Type=26), total payload \
size shows less then the included NAL size. This causes the computation of the next \
NAL (MTAP16) size to go wrong, which later causes Buffer size to reset and result in \
a panic.

Fix:
In case of invalid/corrupted MTAP NAL, setting the NAL size equal to remaining \
available buffer size i.e. if the NAL coming is greater than the RTP payload then set \
it equal to available payload size instead of ignoring it completely, hence \
neglecting the fillers. This will fix the crash but we may get artifacts or the video \
may stop gracefully at some later stage.

Files modified & changes:
datatype/mp4/payload/h264pyld.cpp

Image Size and Heap Use impact: No major impact
 
Module Release testing (STIF) : Passed
 
Test case(s) Added  : No

Memory leak check performed : Passed, No additional leaks introduced.
 
Platforms and Profiles Build Verified: helix-client-s60-52-mmf-mdf-dsp
 
Platforms and Profiles Functionality verified: armv5, winscw
 
Branch: 210CayS, 420Bizo and HEAD



Index: h264pyld.cpp
===================================================================
RCS file: /cvsroot/datatype/mp4/payload/h264pyld.cpp,v
retrieving revision 1.9.2.6
retrieving revision 1.9.2.7
diff -u -d -r1.9.2.6 -r1.9.2.7
--- h264pyld.cpp	13 Oct 2009 06:26:01 -0000	1.9.2.6
+++ h264pyld.cpp	29 Mar 2010 06:38:36 -0000	1.9.2.7
@@ -937,7 +937,7 @@
     UINT8 uPacketHeader = 0; 
 
     CNALUPacket* pNALUPacket = NULL;
-    UINT32 ulBuffSize = 0;
+    INT32 ulBuffSize = 0;
     UINT16 usDON = 0;
     UINT16 usDONB = 0;
     UINT32 offset = 0;
@@ -1052,6 +1052,14 @@
                             else
                             {
 								UINT32 ulNalSize = ((UINT16)pData[0]<<8) + pData[1];
+                                //If the NAL coming is greater than the RTP payload
+                                //then set it equal to buff size hence neglect \
fillers +                                //This is invalid/corrupted MTAP NAL
+                                if(ulNalSize > ulBuffSize)
+                                {
+                                    ulNalSize = ulBuffSize;
+                                }
+
                                 offset = 2;
                                 if (uPacketType == MTAP16)
                                 {


_______________________________________________
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