Skip to content
Snippets Groups Projects
Commit 615c2879 authored by Sergiy's avatar Sergiy Committed by Kostya Shishkov
Browse files

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
parent b593f7fd
Branches
Tags
No related merge requests found
...@@ -706,9 +706,11 @@ static int rtmp_close(URLContext *h) ...@@ -706,9 +706,11 @@ static int rtmp_close(URLContext *h)
rt->flv_data = NULL; rt->flv_data = NULL;
if (rt->out_pkt.data_size) if (rt->out_pkt.data_size)
ff_rtmp_packet_destroy(&rt->out_pkt); 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); av_freep(&rt->flv_data);
url_close(rt->stream); url_close(rt->stream);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment