summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGöran Jönsson <goranjn@axis.com>2014-11-25 13:31:48 +0100
committerTim-Philipp Müller <tim@centricular.com>2014-12-11 14:23:30 +0000
commit9e28d019bf03939d16840666690cb3e41b72c83b (patch)
tree16741dec0b24abaea77d563828a5463cd643a794
parent7084f7701bfe82ccf4e31e3600402df8b0bb080f (diff)
downloadgstreamer-plugins-base-9e28d019bf03939d16840666690cb3e41b72c83b.tar.gz
rtspconnection: No remove child if destroyed.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=740730
-rw-r--r--gst-libs/gst/rtsp/gstrtspconnection.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gst-libs/gst/rtsp/gstrtspconnection.c b/gst-libs/gst/rtsp/gstrtspconnection.c
index bfc74559a..bea1645bc 100644
--- a/gst-libs/gst/rtsp/gstrtspconnection.c
+++ b/gst-libs/gst/rtsp/gstrtspconnection.c
@@ -3129,7 +3129,8 @@ gst_rtsp_source_dispatch_read (GPollableInputStream * stream,
else if (G_UNLIKELY (res == GST_RTSP_EEOF)) {
g_mutex_lock (&watch->mutex);
if (watch->readsrc) {
- g_source_remove_child_source ((GSource *) watch, watch->readsrc);
+ if (!g_source_is_destroyed ((GSource *) watch))
+ g_source_remove_child_source ((GSource *) watch, watch->readsrc);
g_source_unref (watch->readsrc);
watch->readsrc = NULL;
}
@@ -3292,7 +3293,8 @@ gst_rtsp_source_dispatch_write (GPollableOutputStream * stream,
rec = g_queue_pop_tail (watch->messages);
if (rec == NULL) {
if (watch->writesrc) {
- g_source_remove_child_source ((GSource *) watch, watch->writesrc);
+ if (!g_source_is_destroyed ((GSource *) watch))
+ g_source_remove_child_source ((GSource *) watch, watch->writesrc);
g_source_unref (watch->writesrc);
watch->writesrc = NULL;
/* we create and add the write source again when we actually have