summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2014-09-10 10:54:03 -0700
committerDavid Schleef <ds@schleef.org>2014-09-10 10:54:03 -0700
commit2526e2ed95129e1666e280276f7aa07e9e07ca78 (patch)
tree11052af99aedef77cbc7538c39b244798c3e3e59
parente1ca622c11f0f154c1c89086ffa354eb094ed47f (diff)
connection: be more careful about threading
Make sure handlers aren't attached to the wrong main context.
-rw-r--r--rtmp/rtmpconnection.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/rtmp/rtmpconnection.c b/rtmp/rtmpconnection.c
index ffb85d7..f865fa4 100644
--- a/rtmp/rtmpconnection.c
+++ b/rtmp/rtmpconnection.c
@@ -268,6 +268,9 @@ gst_rtmp_connection_start_output (GstRtmpConnection * sc)
if (!sc->handshake_complete)
return;
+ if (sc->output_source)
+ return;
+
os = g_io_stream_get_output_stream (G_IO_STREAM (sc->connection));
sc->output_source =
g_pollable_output_stream_create_source (G_POLLABLE_OUTPUT_STREAM (os),