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

List:       helix-protocol-cvs
Subject:    [Protocol-cvs] rtsp rtspclnt.cpp,1.221.2.19,1.221.2.20
From:       tzupan () helixcommunity ! org
Date:       2011-02-14 19:34:58
Message-ID: 201102141935.p1EJZ2fr003482 () mailer ! progressive-comp ! com
[Download RAW message or body]

Update of /cvsroot/protocol/rtsp
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv9417

Modified Files:
      Tag: hxclient_3_1_0_atlas
	rtspclnt.cpp 
Log Message:
Player fails to connect to scalable multicast

Index: rtspclnt.cpp
===================================================================
RCS file: /cvsroot/protocol/rtsp/rtspclnt.cpp,v
retrieving revision 1.221.2.19
retrieving revision 1.221.2.20
diff -u -d -r1.221.2.19 -r1.221.2.20
--- rtspclnt.cpp	26 Oct 2010 20:45:09 -0000	1.221.2.19
+++ rtspclnt.cpp	14 Feb 2011 19:34:55 -0000	1.221.2.20
@@ -10957,7 +10957,7 @@
         {
             IHXBuffer*      pBuffer = NULL;
             UINT16          unRules = 0;
-            ASMRuleBook     rules((char*)pRuleBuf->GetBuffer());
+            ASMRuleBook     rules(m_pContext, (char*)pRuleBuf->GetBuffer());
 
             unRules = rules.GetNumRules();
 	    if (unRules > MAX_ASM_RULES)
@@ -10973,6 +10973,7 @@
 
             // get subscriptions for this bandwidth
             HXBOOL bSubInfo[MAX_ASM_RULES];
+            memset(bSubInfo, 0, (sizeof(HXBOOL) * MAX_ASM_RULES));
             UINT16 unRuleNum = 0;
 
             IHXValues* pValues = NULL;
@@ -10986,11 +10987,13 @@
 
             // get a rule number that we are interested in
             int y;
+            HXBOOL bFoundRule = FALSE;
             for (y = 0; y < (int)unRules; y++)
             {
                 if (TRUE == bSubInfo[y])
                 {
                     IHXBuffer* pBw = 0;
+                    bFoundRule = TRUE;
                     unRuleNum = y;
 
                     // make sure AverageBandwidth != 0
@@ -11011,6 +11014,13 @@
                 }
             }
             HX_RELEASE(pRuleBuf);
+            if(!bFoundRule)
+            {
+                HX_RELEASE(pFileHeader);
+                HX_RELEASE(pBandwidth);
+                HX_RELEASE(pHeader);
+                return FALSE;
+            }
         }
         else
         {
@@ -11033,7 +11043,7 @@
         IHXBuffer*      pBuffer     = NULL;
         UINT16          unRules     = 0;
 
-        ASMRuleBook     rules((char*)pRuleBuf->GetBuffer());
+        ASMRuleBook     rules(m_pContext, (char*)pRuleBuf->GetBuffer());
 
         unRules = rules.GetNumRules();
 	if (unRules > MAX_ASM_RULES)
@@ -11048,6 +11058,7 @@
 
         // get subscriptions for this bandwidth
         HXBOOL bSubInfo[MAX_ASM_RULES];
+        memset(bSubInfo, 0, (sizeof(HXBOOL) * MAX_ASM_RULES));
 
         IHXValues* pValues = NULL;
 	
@@ -11061,16 +11072,27 @@
         // get a rule number that we are interested in
         // Assuming there is only one TRUE
         int y;
+        HXBOOL bFoundRule = FALSE;
         for (y = 0; y < (int)unRules; y++)
         {
             if (TRUE == bSubInfo[y])
             {
                 // there should be only one
                 ulRuleNumber = y;
+                bFoundRule = TRUE;
                 break;
             }
         }
 
+        if(!bFoundRule)
+        {
+            HX_RELEASE(pValues);
+            HX_RELEASE(pRuleBuf);
+            HX_RELEASE(pFileHeader);
+            HX_RELEASE(pBandwidth);
+            return FALSE;
+        }
+
         // Get a BW for each stream
         rules.GetProperties((int)ulRuleNumber, pValues);
         for (int i = 0; i < (int)ulNumStreams; i++)


_______________________________________________
Protocol-cvs mailing list
Protocol-cvs@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/protocol-cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

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