diff options
author | Sebastian Dröge <slomo@circular-chaos.org> | 2013-08-19 16:38:50 +0200 |
---|---|---|
committer | Sebastian Dröge <slomo@circular-chaos.org> | 2013-08-19 16:38:50 +0200 |
commit | b40599f6db3ed12db57b7acfdaa23e2f5d7a629a (patch) | |
tree | fc73887a0fd34dab10cda0332d4bdb3791055c3f /plugins | |
parent | d7c3be226cc808e049e3111ae32ff880b19bee00 (diff) |
multiqueue: Clean up after the streaming thread has stopped
https://bugzilla.gnome.org/show_bug.cgi?id=705835
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/elements/gstmultiqueue.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/plugins/elements/gstmultiqueue.c b/plugins/elements/gstmultiqueue.c index 7a9cd5fce..a83220d6b 100644 --- a/plugins/elements/gstmultiqueue.c +++ b/plugins/elements/gstmultiqueue.c @@ -1474,7 +1474,19 @@ gst_multi_queue_sink_activate_mode (GstPad * pad, GstObject * parent, sq->last_query = FALSE; g_cond_signal (&sq->query_handled); gst_data_queue_set_flushing (sq->queue, TRUE); + + /* Wait until streaming thread has finished */ + if (mq) + GST_MULTI_QUEUE_MUTEX_UNLOCK (mq); + GST_PAD_STREAM_LOCK (pad); + if (mq) + GST_MULTI_QUEUE_MUTEX_LOCK (mq); gst_data_queue_flush (sq->queue); + if (mq) + GST_MULTI_QUEUE_MUTEX_UNLOCK (mq); + GST_PAD_STREAM_UNLOCK (pad); + if (mq) + GST_MULTI_QUEUE_MUTEX_LOCK (mq); } res = TRUE; break; |