[FFmpeg-cvslog] r20745 - trunk/libavformat/rtmpproto.c

kostya subversion
Sun Dec 6 08:01:38 CET 2009


Author: kostya
Date: Sun Dec  6 08:01:37 2009
New Revision: 20745

Log:
Do not send invokes to RTMP server if we are not connected to it.
Patch by Sergiy (server.connect("gmail.com").selectAddress("piratfm"))

Modified:
   trunk/libavformat/rtmpproto.c

Modified: trunk/libavformat/rtmpproto.c
==============================================================================
--- trunk/libavformat/rtmpproto.c	Sun Dec  6 01:03:53 2009	(r20744)
+++ trunk/libavformat/rtmpproto.c	Sun Dec  6 08:01:37 2009	(r20745)
@@ -706,9 +706,11 @@ static int rtmp_close(URLContext *h)
         rt->flv_data = NULL;
         if (rt->out_pkt.data_size)
             ff_rtmp_packet_destroy(&rt->out_pkt);
-        gen_fcunpublish_stream(h, rt);
+        if (rt->state > STATE_FCPUBLISH)
+            gen_fcunpublish_stream(h, rt);
     }
-    gen_delete_stream(h, rt);
+    if (rt->state > STATE_HANDSHAKED)
+        gen_delete_stream(h, rt);
 
     av_freep(&rt->flv_data);
     url_close(rt->stream);



More information about the ffmpeg-cvslog mailing list