summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2013-02-06 13:18:18 +0100
committerWim Taymans <wim.taymans@collabora.co.uk>2013-02-06 13:18:18 +0100
commitc8fb1c720cd429970865f27633dd682bed3c5815 (patch)
treea3b1d57f0987df2371ed89f90324ad636344cc35
parent96f8775a0dff3b7700b9e8328de23b81f947ed0c (diff)
rtspsrc: flush connection when stopping
When we stop, we can flush all pending commands so that we can stop and join the task. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=684924
-rw-r--r--gst/rtsp/gstrtspsrc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c
index 22905e829..c9a5fb6bc 100644
--- a/gst/rtsp/gstrtspsrc.c
+++ b/gst/rtsp/gstrtspsrc.c
@@ -285,6 +285,9 @@ static gboolean gst_rtspsrc_push_event (GstRTSPSrc * src, GstEvent * event);
#define CMD_RECONNECT (1 << 5)
#define CMD_LOOP (1 << 6)
+/* mask for all commands */
+#define CMD_ALL ((CMD_LOOP << 1) - 1)
+
#define GST_ELEMENT_PROGRESS(el, type, code, text) \
G_STMT_START { \
gchar *__txt = _gst_element_error_printf text; \
@@ -6699,7 +6702,7 @@ gst_rtspsrc_stop (GstRTSPSrc * src)
GST_DEBUG_OBJECT (src, "stopping");
/* also cancels pending task */
- gst_rtspsrc_loop_send_cmd (src, CMD_WAIT, CMD_CLOSE);
+ gst_rtspsrc_loop_send_cmd (src, CMD_WAIT, CMD_ALL);
GST_OBJECT_LOCK (src);
if ((task = src->task)) {