Mercurial > libavformat.hg
changeset 5419:006c95a7a3d2 libavformat
Do not send invokes to RTMP server if we are not connected to it.
Patch by Sergiy (server.connect("gmail.com").selectAddress("piratfm"))
author | kostya |
---|---|
date | Sun, 06 Dec 2009 07:01:37 +0000 |
parents | 58fb1f12d94f |
children | 62329840eb7c |
files | rtmpproto.c |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/rtmpproto.c Sun Dec 06 00:03:53 2009 +0000 +++ b/rtmpproto.c Sun Dec 06 07:01:37 2009 +0000 @@ -706,9 +706,11 @@ 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);