diff options
author | Sergiy <piratfm@gmail.com> | 2009-12-06 07:01:37 +0000 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2009-12-06 07:01:37 +0000 |
commit | 615c2879903cde62f70785cf19dcc94cbdefe93d (patch) | |
tree | 3356b4f6f14c70c5628b751aa37189668c21da0e /libavformat | |
parent | b593f7fdef3448ea0fadfccc0bd7e4fde3df84aa (diff) | |
download | ffmpeg-615c2879903cde62f70785cf19dcc94cbdefe93d.tar.gz |
Do not send invokes to RTMP server if we are not connected to it.
Patch by Sergiy (server.connect("gmail.com").selectAddress("piratfm"))
Originally committed as revision 20745 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/rtmpproto.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c index f27ff8ca0f..10b04fe694 100644 --- a/libavformat/rtmpproto.c +++ b/libavformat/rtmpproto.c @@ -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); |