[rtmpdump] r378 - in trunk: librtmp/rtmp.c rtmpsuck.c

hyc subversion at mplayerhq.hu
Sun Mar 21 22:15:07 CET 2010


Author: hyc
Date: Sun Mar 21 22:15:06 2010
New Revision: 378

Log:
More fixes due to -r369

Modified:
   trunk/librtmp/rtmp.c
   trunk/rtmpsuck.c

Modified: trunk/librtmp/rtmp.c
==============================================================================
--- trunk/librtmp/rtmp.c	Sun Mar 21 21:58:11 2010	(r377)
+++ trunk/librtmp/rtmp.c	Sun Mar 21 22:15:06 2010	(r378)
@@ -2736,21 +2736,23 @@ RTMP_Close(RTMP *r)
 
   if (RTMP_IsConnected(r))
     {
-	  if (r->m_stream_id > 0)
-	    {
-	      if ((r->Link.protocol & RTMP_FEATURE_WRITE))
-		    SendFCUnpublish(r);
-		  SendDeleteStream(r, r->m_stream_id);
-		}
-	  if (r->m_clientID.av_val)
-	    {
-		  HTTP_Post(r, RTMPT_CLOSE, "", 1);
-		  free(r->m_clientID.av_val);
-		  r->m_clientID.av_val = NULL;
-		  r->m_clientID.av_len = 0;
-		}
-      RTMPSockBuf_Close(&r->m_sb);
+      if (r->m_stream_id > 0)
+        {
+          if ((r->Link.protocol & RTMP_FEATURE_WRITE))
+	    SendFCUnpublish(r);
+	  i = r->m_stream_id;
+	  r->m_stream_id = 0;
+	  SendDeleteStream(r, i);
 	}
+      if (r->m_clientID.av_val)
+        {
+	  HTTP_Post(r, RTMPT_CLOSE, "", 1);
+	  free(r->m_clientID.av_val);
+	  r->m_clientID.av_val = NULL;
+	  r->m_clientID.av_len = 0;
+	}
+      RTMPSockBuf_Close(&r->m_sb);
+    }
 
   r->m_stream_id = -1;
   r->m_sb.sb_socket = -1;

Modified: trunk/rtmpsuck.c
==============================================================================
--- trunk/rtmpsuck.c	Sun Mar 21 21:58:11 2010	(r377)
+++ trunk/rtmpsuck.c	Sun Mar 21 22:15:06 2010	(r378)
@@ -712,7 +712,7 @@ void doServe(STREAMING_SERVER * server,	
 {
   RTMPPacket pc = { 0 }, ps = { 0 };
   RTMPChunk rk = { 0 };
-  char *buf;
+  char *buf = NULL;
   unsigned int buflen = 131072;
   bool paused = false;
 


More information about the rtmpdump mailing list