diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2014-02-09 11:06:52 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2014-02-09 11:06:52 +0100 |
commit | 54ba965e6376891d6d7e580732f2ab2de3d4a9cc (patch) | |
tree | 5f5c2d3ca58c0833fdae43f4e686f5bddd87d5e3 /plugins | |
parent | c05f749f91dae26d011bfd0e78ac7b99c2faf663 (diff) |
Imported Upstream version 1.2.3upstream/1.2.3
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Makefile.in | 2 | ||||
-rw-r--r-- | plugins/elements/Makefile.in | 2 | ||||
-rw-r--r-- | plugins/elements/gstmultiqueue.c | 8 | ||||
-rw-r--r-- | plugins/elements/gsttee.c | 17 | ||||
-rw-r--r-- | plugins/elements/gsttee.h | 3 |
5 files changed, 15 insertions, 17 deletions
diff --git a/plugins/Makefile.in b/plugins/Makefile.in index 472696c..f908e43 100644 --- a/plugins/Makefile.in +++ b/plugins/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.14 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. diff --git a/plugins/elements/Makefile.in b/plugins/elements/Makefile.in index c00da16..01f7192 100644 --- a/plugins/elements/Makefile.in +++ b/plugins/elements/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.14 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. diff --git a/plugins/elements/gstmultiqueue.c b/plugins/elements/gstmultiqueue.c index 266fead..df0c65d 100644 --- a/plugins/elements/gstmultiqueue.c +++ b/plugins/elements/gstmultiqueue.c @@ -508,8 +508,11 @@ gst_multi_queue_set_property (GObject * object, guint prop_id, gst_data_queue_get_level (q->queue, &size); /* do not reduce max size below current level if the single queue has grown because of empty queue */ - if (new_size >= size.visible && size.visible <= mq->max_size.visible) + if (new_size == 0) { q->max_size.visible = new_size; + } else if (new_size > size.visible) { + q->max_size.visible = new_size; + } tmp = g_list_next (tmp); }; @@ -740,6 +743,9 @@ gst_multi_queue_change_state (GstElement * element, GstStateChange transition) sq = (GstSingleQueue *) tmp->data; sq->flushing = TRUE; g_cond_signal (&sq->turn); + + sq->last_query = FALSE; + g_cond_signal (&sq->query_handled); } GST_MULTI_QUEUE_MUTEX_UNLOCK (mqueue); break; diff --git a/plugins/elements/gsttee.c b/plugins/elements/gsttee.c index a6d4b9d..d45b483 100644 --- a/plugins/elements/gsttee.c +++ b/plugins/elements/gsttee.c @@ -78,10 +78,6 @@ gst_tee_pull_mode_get_type (void) return type; } -/* lock to protect request pads from being removed while downstream */ -#define GST_TEE_DYN_LOCK(tee) g_mutex_lock (&(tee)->dyn_lock) -#define GST_TEE_DYN_UNLOCK(tee) g_mutex_unlock (&(tee)->dyn_lock) - #define DEFAULT_PROP_NUM_SRC_PADS 0 #define DEFAULT_PROP_HAS_CHAIN TRUE #define DEFAULT_PROP_SILENT TRUE @@ -220,8 +216,6 @@ gst_tee_finalize (GObject * object) g_free (tee->last_message); - g_mutex_clear (&tee->dyn_lock); - G_OBJECT_CLASS (parent_class)->finalize (object); } @@ -285,8 +279,6 @@ gst_tee_class_init (GstTeeClass * klass) static void gst_tee_init (GstTee * tee) { - g_mutex_init (&tee->dyn_lock); - tee->sinkpad = gst_pad_new_from_static_template (&sinktemplate, "sink"); tee->sink_mode = GST_PAD_MODE_NONE; @@ -404,8 +396,6 @@ gst_tee_release_pad (GstElement * element, GstPad * pad) GST_DEBUG_OBJECT (tee, "releasing pad"); - /* wait for pending pad_alloc to finish */ - GST_TEE_DYN_LOCK (tee); GST_OBJECT_LOCK (tee); /* mark the pad as removed so that future pad_alloc fails with NOT_LINKED. */ GST_TEE_PAD_CAST (pad)->removed = TRUE; @@ -419,7 +409,6 @@ gst_tee_release_pad (GstElement * element, GstPad * pad) gst_element_remove_pad (GST_ELEMENT_CAST (tee), pad); gst_pad_set_active (pad, FALSE); - GST_TEE_DYN_UNLOCK (tee); gst_object_unref (pad); @@ -591,6 +580,9 @@ gst_tee_handle_data (GstTee * tee, gpointer data, gboolean is_list) if (!pads->next) { GstPad *pad = GST_PAD_CAST (pads->data); + /* Keep another ref around, a pad probe + * might release and destroy the pad */ + gst_object_ref (pad); GST_OBJECT_UNLOCK (tee); if (pad == tee->pull_pad) { @@ -600,6 +592,9 @@ gst_tee_handle_data (GstTee * tee, gpointer data, gboolean is_list) } else { ret = gst_pad_push (pad, GST_BUFFER_CAST (data)); } + + gst_object_unref (pad); + return ret; } diff --git a/plugins/elements/gsttee.h b/plugins/elements/gsttee.h index c092b8f..3f408cb 100644 --- a/plugins/elements/gsttee.h +++ b/plugins/elements/gsttee.h @@ -66,9 +66,6 @@ struct _GstTee { GstElement element; /*< private >*/ - /* lock protecting dynamic pads */ - GMutex dyn_lock; - GstPad *sinkpad; GstPad *allocpad; guint pad_counter; |