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

List:       helix-datatype-dev
Subject:    [datatype-dev] CR: FIX for PR 162234: German University: RV Content
From:       "Ravindra Dolas" <rdolas () real ! com>
Date:       2008-01-28 13:52:50
Message-ID: 010401c861b3$69dbec80$af02280a () itestreal ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi All,
 
The Fix provided for PR-162234 was causing the real player to stop or crash
when 
playing back the content created by camtasia studio. Some version of Real
Player 11 
were able to play the content fine and some other including 10.5 was
stopping or 
crashing at some points.
 
I have made the changes in txfixup.cpp file to fix the above mentioned
behavior.
Now I am setting the *pOutputBuffer to 0 and *pOutputSizeUsed to 1 and then
returning
from the OffsetInternalTimestamps() method when the ulFrameSize is greater
than 
MAX_PACKET_SIZE i.e(32768). This is preventing some garbage to be sent to
the player
and hence avoiding the crash at the player end.
 
Below is the CR mail sent previously:
 
Thanks,
Ravindra Dolas
 
 
Synopsis
========
 
This CR includes fix for PR 162234: German University: RV Content created
with 
Camtasia studio crashes Server
 
Quick link to the PR:
https://bugs.dev.prognet.com/show_bug.cgi?id=162234
 
Branch: SERVER_11_1_RN, HEAD, SERVER_12
Suggested Reviewer: Jamie, Chytanya
 

Description

===========

Content created with Camtasia Studio causes the Windows Helix Server to
crash during 
playback with no information logged (even in debug mode). However on Linux
system 
the Real Video file causes a number of CA's which cause the server to
malfunction.
 
After analyzing the issue I found that the problem was with the real video
content 
created with Camtasia studio. Real Player 11 was also unable to playback the
content 
and was crashing with "out of memory" error message. The server was crashing
while 
doing the memcpy on the invalid and very large packet size values.
 
Sometimes we are getting very large packet size values for the content
created with 
Camtasia Studio and these packet size values seems to be corrupted inside
the file.
Crash was because of the large and invalid packet size values.
 
FIX
===
For handling this issue I am checking the packet sizes with the
MAX_PACKET_SIZE value
and breaking from the loop if the packet size is greater than the
MAX_PACKET_SIZE which
is defined as 32768. This will skip the packet with large and invalid packet
size.
 
I moved the definition of MAX_PACKET_SIZE from intrstrm.cpp to tsfixup.h so
that the same
Max packet value can be used by both the tsfixup.cpp and intrstrm.cpp files.
With this only
one entry of max packet size will remain in the code.
 
Files Affected:
===============
datatype-restricted\rm\video\payload\tsfixup.cpp
datatype-restricted\rm\video\payload\pub\tsfixup.h
datatype-restricted\rm\fileformat\intrstrm.cpp
 
 

Testing Performed

=================

 

Unit Tests: 

- Tested that the server is not crashing with the content created with
Camtasia 

  studio on Windows and Linux Platform. Also tested against the files
provided

  by the customer.

 

Integration Tests: 

- None

 

Leak Tests:

- None

 

Performance Tests:

- None

 

Build verified: win32-i386-vc7, linux-rhel4-i686, sunos-5.9-sparc-server

 

Platforms Tested: win32-i386-vc7, linux-rhel-i686

 

QA Hints

========

Please verify that the content created with Camtasia Studio is not crashing
the 

server.

 

Thanks,

Ravindra Dolas


[Attachment #5 (text/html)]

<html xmlns:v="urn:schemas-microsoft-com:vml" \
xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:st1="urn:schemas-microsoft-com:office:smarttags" \
xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="PlaceType"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="PlaceName"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="place"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;}
pre
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:10.0pt;
	font-family:"Courier New";}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:Arial;
	color:windowtext;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
	{page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1><pre style='text-align:justify'><font size=2
face="Courier New"><span style='font-size:10.0pt'>Hi \
All,<o:p></o:p></span></font></pre><pre style='text-align:justify'><font size=2 \
face="Courier New"><span \
style='font-size:10.0pt'><o:p>&nbsp;</o:p></span></font></pre><pre \
style='text-align:justify'><font size=2 face="Courier New"><span \
style='font-size:10.0pt'>The Fix provided for PR-162234 was causing the real player \
to stop or crash when <o:p></o:p></span></font></pre><pre \
style='text-align:justify'><font size=2 face="Courier New"><span \
style='font-size:10.0pt'>playing back the content created by camtasia studio. Some \
version of Real Player 11 <o:p></o:p></span></font></pre><pre \
style='text-align:justify'><font size=2 face="Courier New"><span \
style='font-size:10.0pt'>were able to play the content fine and some other including \
10.5 was stopping or <o:p></o:p></span></font></pre><pre \
style='text-align:justify'><font size=2 face="Courier New"><span \
style='font-size:10.0pt'>crashing at some points.<o:p></o:p></span></font></pre><pre \
style='text-align:justify'><font size=2 face="Courier New"><span \
style='font-size:10.0pt'><o:p>&nbsp;</o:p></span></font></pre><pre \
style='text-align:justify'><font size=2 face="Courier New"><span \
style='font-size:10.0pt'>I have made the changes in txfixup.cpp file to fix the above \
mentioned behavior.<o:p></o:p></span></font></pre><pre \
style='text-align:justify'><font size=2 face="Courier New"><span \
style='font-size:10.0pt'>Now I am setting the *pOutputBuffer to 0 and \
*pOutputSizeUsed to 1 and then returning<o:p></o:p></span></font></pre><pre \
style='text-align:justify'><font size=2 face="Courier New"><span \
style='font-size:10.0pt'>from the OffsetInternalTimestamps() method when the \
ulFrameSize is greater than <o:p></o:p></span></font></pre><pre \
style='text-align:justify'><font size=2 face="Courier New"><span \
style='font-size:10.0pt'>MAX_PACKET_SIZE i.e(32768). This is preventing some garbage \
to be sent to the player<o:p></o:p></span></font></pre><pre \
style='text-align:justify'><font size=2 face="Courier New"><span \
style='font-size:10.0pt'>and hence avoiding the crash at the player \
end.<o:p></o:p></span></font></pre><pre style='text-align:justify'><font size=2 \
face="Courier New"><span \
style='font-size:10.0pt'><o:p>&nbsp;</o:p></span></font></pre><pre \
style='text-align:justify'><font size=2 face="Courier New"><span \
style='font-size:10.0pt'>Below is the CR mail sent \
previously:<o:p></o:p></span></font></pre><pre style='text-align:justify'><font \
size=2 face="Courier New"><span \
style='font-size:10.0pt'><o:p>&nbsp;</o:p></span></font></pre><pre \
style='text-align:justify'><font size=2 face="Courier New"><span \
style='font-size:10.0pt'>Thanks,<o:p></o:p></span></font></pre><pre \
style='text-align:justify'><st1:PersonName w:st="on"><font size=2  face="Courier \
New"><span style='font-size:10.0pt'>Ravindra \
Dolas</span></font></st1:PersonName><o:p></o:p></pre><pre \
style='text-align:justify'><font size=2 face="Courier New"><span \
style='font-size:10.0pt'><o:p>&nbsp;</o:p></span></font></pre><pre \
style='text-align:justify'><font size=2 face="Courier New"><span \
style='font-size:10.0pt'><o:p>&nbsp;</o:p></span></font></pre><pre \
style='text-align:justify'><font size=2 face="Courier New"><span \
style='font-size:10.0pt'>Synopsis<o:p></o:p></span></font></pre><pre \
style='text-align:justify'><font size=2 face="Courier New"><span \
style='font-size:10.0pt'>========<o:p></o:p></span></font></pre><pre \
style='text-align:justify'><font size=2 face="Courier New"><span \
style='font-size:10.0pt'><o:p>&nbsp;</o:p></span></font></pre><pre \
style='text-align:justify'><font size=2 face="Courier New"><span \
style='font-size:10.0pt'>This CR includes fix for PR 162234: <st1:place \
w:st="on"><st1:PlaceName  w:st="on">German</st1:PlaceName> <st1:PlaceType \
w:st="on">University</st1:PlaceType></st1:place>: RV Content created with \
<o:p></o:p></span></font></pre><pre style='text-align:justify'><font size=2 \
face="Courier New"><span style='font-size:10.0pt'>Camtasia studio crashes \
Server<o:p></o:p></span></font></pre><pre style='text-align:justify'><font size=2 \
face="Courier New"><span \
style='font-size:10.0pt'><o:p>&nbsp;</o:p></span></font></pre><pre \
style='text-align:justify'><font size=2 face="Courier New"><span \
style='font-size:10.0pt'>Quick link to the PR:<o:p></o:p></span></font></pre><pre \
style='text-align:justify'><font size=2 face="Courier New"><span \
style='font-size:10.0pt'><a \
href="https://bugs.dev.prognet.com/show_bug.cgi?id=162234" \
title="blocked::https://bugs.dev.prognet.com/show_bug.cgi?id=162234">https://bugs.dev.prognet.com/show_bug.cgi?id=162234</a><o:p></o:p></span></font></pre><pre
 style='text-align:justify'><font size=2 face="Courier New"><span
style='font-size:10.0pt'><o:p>&nbsp;</o:p></span></font></pre><pre
style='text-align:justify'><font size=2 face="Courier New"><span
style='font-size:10.0pt'>Branch: SERVER_11_1_RN, HEAD, \
SERVER_12<o:p></o:p></span></font></pre><pre style='text-align:justify'><font size=2 \
face="Courier New"><span style='font-size:10.0pt'>Suggested Reviewer: Jamie, \
Chytanya<o:p></o:p></span></font></pre><pre style='text-align:justify'><font size=2 \
face="Courier New"><span \
style='font-size:10.0pt'><o:p>&nbsp;</o:p></span></font></pre>

<p class=MsoNormal style='text-align:justify'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier \
New"'>Description<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-align:justify'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier \
New"'>===========<o:p></o:p></span></font></p>

<pre><font size=2 face="Courier New"><span style='font-size:10.0pt'>Content created \
with Camtasia Studio causes the Windows Helix Server to crash during \
<o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span \
style='font-size:10.0pt'>playback with no information logged (even in debug mode). \
However on Linux system <o:p></o:p></span></font></pre><pre><font size=2 \
face="Courier New"><span style='font-size:10.0pt'>the Real Video file causes a number \
of CA's which cause the server to \
malfunction.<o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span \
style='font-size:10.0pt'><o:p>&nbsp;</o:p></span></font></pre><pre><font size=2 \
face="Courier New"><span style='font-size:10.0pt'>After analyzing the issue I found \
that the problem was with the real video content \
<o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span \
style='font-size:10.0pt'>created with Camtasia studio. Real Player 11 was also unable \
to playback the content <o:p></o:p></span></font></pre><pre><font size=2 \
face="Courier New"><span style='font-size:10.0pt'>and was crashing with &#8220;out of \
memory&#8221; error message. The server was crashing while \
<o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span \
style='font-size:10.0pt'>doing the memcpy on the invalid and very large packet size \
values.<o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span \
style='font-size:10.0pt'><o:p>&nbsp;</o:p></span></font></pre><pre><font size=2 \
face="Courier New"><span style='font-size:10.0pt'>Sometimes we are getting very large \
packet size values for the content created with \
<o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span \
style='font-size:10.0pt'>Camtasia Studio and these packet size values seems to be \
corrupted inside the file.<o:p></o:p></span></font></pre><pre><font size=2 \
face="Courier New"><span style='font-size:10.0pt'>Crash was because of the large and \
invalid packet size values.<o:p></o:p></span></font></pre><pre><font size=2 \
face="Courier New"><span \
style='font-size:10.0pt'><o:p>&nbsp;</o:p></span></font></pre><pre><font size=2 \
face="Courier New"><span \
style='font-size:10.0pt'>FIX<o:p></o:p></span></font></pre><pre><font size=2 \
face="Courier New"><span \
style='font-size:10.0pt'>===<o:p></o:p></span></font></pre><pre><font size=2 \
face="Courier New"><span style='font-size:10.0pt'>For handling this issue I am \
checking the packet sizes with the MAX_PACKET_SIZE \
value<o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span \
style='font-size:10.0pt'>and breaking from the loop if the packet size is greater \
than the MAX_PACKET_SIZE which<o:p></o:p></span></font></pre><pre><font size=2 \
face="Courier New"><span style='font-size:10.0pt'>is defined as 32768. This will skip \
the packet with large and invalid packet \
size.<o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span \
style='font-size:10.0pt'><o:p>&nbsp;</o:p></span></font></pre><pre><font size=2 \
face="Courier New"><span style='font-size:10.0pt'>I moved the definition of \
MAX_PACKET_SIZE from intrstrm.cpp to tsfixup.h so that the \
same<o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span \
style='font-size:10.0pt'>Max packet value can be used by both the tsfixup.cpp and \
intrstrm.cpp files. With this only<o:p></o:p></span></font></pre><pre><font size=2 \
face="Courier New"><span style='font-size:10.0pt'>one entry of max packet size will \
remain in the code.<o:p></o:p></span></font></pre><pre><font size=2 face="Courier \
New"><span style='font-size:10.0pt'><o:p>&nbsp;</o:p></span></font></pre><pre><font \
size=2 face="Courier New"><span style='font-size:10.0pt'>Files \
Affected:<o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span \
style='font-size:10.0pt'>===============<o:p></o:p></span></font></pre><pre><font \
size=2 face="Courier New"><span \
style='font-size:10.0pt'>datatype-restricted\rm\video\payload\tsfixup.cpp<o:p></o:p></span></font></pre><pre><font
 size=2 face="Courier New"><span \
style='font-size:10.0pt'>datatype-restricted\rm\video\payload\pub\tsfixup.h<o:p></o:p></span></font></pre><pre><font
 size=2 face="Courier New"><span \
style='font-size:10.0pt'>datatype-restricted\rm\fileformat\intrstrm.cpp<o:p></o:p></span></font></pre><pre><font
 size=2 face="Courier New"><span \
style='font-size:10.0pt'><o:p>&nbsp;</o:p></span></font></pre><pre><font size=2 \
face="Courier New"><span \
style='font-size:10.0pt'><o:p>&nbsp;</o:p></span></font></pre>

<p class=MsoNormal style='text-align:justify'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>Testing \
Performed<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-align:justify'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier \
New"'>=================<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-align:justify'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier \
New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-align:justify'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>Unit Tests: \
<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-align:justify'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>- Tested that the server is
not crashing with the content created with Camtasia <o:p></o:p></span></font></p>

<p class=MsoNormal style='text-align:justify'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp; studio on Windows and
Linux Platform. Also tested against the files provided<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-align:justify'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp; by the \
customer.<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-align:justify'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier \
New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-align:justify'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>Integration Tests: \
<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-align:justify'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>- \
None<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-align:justify'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier \
New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-align:justify'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>Leak \
Tests:<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-align:justify'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>- \
None<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-align:justify'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier \
New"'>&nbsp;<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-align:justify'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>Performance \
Tests:<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-align:justify'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>- \
None<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-align:justify'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier \
New"'>&nbsp;<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-align:justify'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>Build verified:
win32-i386-vc7, linux-rhel4-i686, sunos-5.9-sparc-server<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-align:justify'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier \
New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-align:justify'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>Platforms Tested:
win32-i386-vc7, linux-rhel-i686<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-align:justify'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier \
New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-align:justify'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>QA \
Hints<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-align:justify'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier \
New"'>========<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-align:justify'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>Please verify that the
content created with Camtasia Studio is not crashing the \
<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-align:justify'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier \
New"'>server.<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-align:justify'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier \
New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-align:justify'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier \
New"'>Thanks,<o:p></o:p></span></font></p>

<p class=MsoNormal><st1:PersonName w:st="on"><font size=2 face="Courier New"><span
 style='font-size:10.0pt;font-family:"Courier New"'>Ravindra \
Dolas</span></font></st1:PersonName><font size=2 face="Courier New"><span \
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

</div>

</body>

</html>


["tsfixup2.diff" (application/octet-stream)]

Index: tsfixup.cpp
===================================================================
RCS file: /cvsroot/rarvcode-video/payload/tsfixup.cpp,v
retrieving revision 1.8.40.1
diff -u -r1.8.40.1 tsfixup.cpp
--- tsfixup.cpp	16 Jan 2008 11:53:36 -0000	1.8.40.1
+++ tsfixup.cpp	28 Jan 2008 13:17:35 -0000
@@ -153,7 +153,9 @@
 
         if (ulFrameSize > MAX_PACKET_SIZE)
         {
-            break;
+            *pOutputBuffer = 0;
+            *pOutputSizeUsed = 1;
+            return HXR_OK;
         }
 
 	// The internal video timestamps are stored in a maximum of 30


_______________________________________________
Datatype-dev mailing list
Datatype-dev@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/datatype-dev


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

Configure | About | News | Add a list | Sponsored by KoreLogic