[rtmpdump] r55 - rtmp.cpp rtmpdump.cpp

hyc subversion at mplayerhq.hu
Fri Nov 20 20:03:20 CET 2009


Author: hyc
Date: Fri Nov 20 20:03:20 2009
New Revision: 55

Log:
flvstreamer bug#107134 stop streaming for onFCUnsubscribe

Modified:
   rtmp.cpp
   rtmpdump.cpp

Modified: rtmp.cpp
==============================================================================
--- rtmp.cpp	Fri Nov 20 19:43:45 2009	(r54)
+++ rtmp.cpp	Fri Nov 20 20:03:20 2009	(r55)
@@ -1151,6 +1151,11 @@ int CRTMP::HandleInvoke(const char *body
   {
     // SendOnFCSubscribe();
   }
+  else if (CSCMP(method,"onFCUnsubscribe"))
+  {
+    Close();
+    return 1;
+  }
   else if (CSCMP(method,"_onbwcheck"))
   {
     SendCheckBWResult(txn);

Modified: rtmpdump.cpp
==============================================================================
--- rtmpdump.cpp	Fri Nov 20 19:43:45 2009	(r54)
+++ rtmpdump.cpp	Fri Nov 20 20:03:20 2009	(r55)
@@ -158,6 +158,12 @@ int WriteStream(
 		char *packetBody	= packet.m_body;
 		unsigned int nPacketLen	= packet.m_nBodySize;
 
+                // Return -3 if this was completed nicely with invoke message Play.Stop or Play.Complete
+                if (rtnGetNextMediaPacket == 2) {
+                        Log(LOGDEBUG, "Got Play.Complete or Play.Stop from server. Assuming stream is complete");
+                        return -3;
+                }
+
 		// skip video info/command packets
 		if(packet.m_packetType == 0x09 && 
 		   nPacketLen == 2 &&
@@ -432,11 +438,6 @@ stopKeyframeSearch:
 		if(tsm)
  			*tsm = bLiveStream ? packet.m_nTimeStamp : nTimeStamp;
 
-                // Return -3 if this was completed nicely with invoke message Play.Stop or Play.Complete
-                if (rtnGetNextMediaPacket == 2) {
-                        Log(LOGDEBUG, "Got Play.Complete or Play.Stop from server. Assuming stream is complete");
-                        return -3;
-                }
 
 		return size;
 	}


More information about the rtmpdump mailing list