[prev in list] [next in list] [prev in thread] [next in thread]
List: helix-datatype-cvs
Subject: [Datatype-cvs] rm/audio/renderer raformat.cpp, 1.28.2.6,
From: bobclark () helixcommunity ! org
Date: 2008-08-26 21:39:28
Message-ID: 200808262143.m7QLhiF1003580 () mailer ! progressive-comp ! com
[Download RAW message or body]
Update of /cvsroot/datatype/rm/audio/renderer
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv12434
Modified Files:
Tag: hxclient_1_5_0_cayenne
raformat.cpp raformat.h
Log Message:
merge fix for bug 218551 to 150Cay... was already committed by ehyche to head, \
204Cay, and 310Atlas on 8/20/2008
Index: raformat.cpp
===================================================================
RCS file: /cvsroot/datatype/rm/audio/renderer/raformat.cpp,v
retrieving revision 1.28.2.6
retrieving revision 1.28.2.7
diff -u -d -r1.28.2.6 -r1.28.2.7
--- raformat.cpp 22 Dec 2005 20:07:48 -0000 1.28.2.6
+++ raformat.cpp 26 Aug 2008 21:39:25 -0000 1.28.2.7
@@ -209,6 +209,9 @@
m_ulTrackEndTime = ulTrackEndTime;
theError = m_StreamParam.ReadOneRAHeader(buffer, bLength, pBytesRead);
+
+ // Check for RAFormat validity
+ theError = CheckRAFormatParameters(&m_StreamParam);
// add this codec to the AllCodecs list (if its not already in there)
if (m_StreamParam.codecID && pAllCodecs && (strstr(pAllCodecs, \
m_StreamParam.codecID) == 0)) @@ -2077,3 +2080,23 @@
return bResult;
}
+
+HX_RESULT CRaFormat::CheckRAFormatParameters(CStreamParam* pParam)
+{
+ HX_RESULT retVal = HXR_FAIL;
+
+ if (pParam)
+ {
+ // Clear the return value
+ retVal = HXR_OK;
+ // Check the sample rate.
+ if (pParam->ulSampleRate < 8000 ||
+ pParam->ulSampleRate > 88200)
+ {
+ retVal = HXR_CORRUPT_FILE;
+ }
+ }
+
+ return retVal;
+}
+
Index: raformat.h
===================================================================
RCS file: /cvsroot/datatype/rm/audio/renderer/raformat.h,v
retrieving revision 1.14.6.1
retrieving revision 1.14.6.2
diff -u -d -r1.14.6.1 -r1.14.6.2
--- raformat.h 22 Aug 2005 06:25:07 -0000 1.14.6.1
+++ raformat.h 26 Aug 2008 21:39:25 -0000 1.14.6.2
@@ -285,6 +285,8 @@
UINT32& ulDuration,
UINT32& ulSize);
+ HX_RESULT CheckRAFormatParameters(CStreamParam* pParam);
+
IHXCommonClassFactory* m_pCommonClassFactory;
IHXCommonClassFactory* m_pCachingClassFactory;
IHXUpgradeCollection* m_pUpgradeCollection;
_______________________________________________
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