summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorEdward Hervey <bilboed@bilboed.com>2009-09-28 13:19:10 +0200
committerEdward Hervey <bilboed@bilboed.com>2009-10-07 09:25:41 +0200
commit8c67b6390ee9e33810f5c6f2098ab4645f1c3651 (patch)
tree6f8a4d10b721309d29b3ca7795fd97858ec8cf1f /plugins
parentd28a3e743502d64c2a96bdb637043d6df0589009 (diff)
plugins/multiqueue: Use cached value instead of expensive object get.
The task will always exist as long as its owner (i.e. the pad) and that owner's owner (i.e. multiqueue) exist. Reduces the number of instruction fetches by 36%.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/elements/gstmultiqueue.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/plugins/elements/gstmultiqueue.c b/plugins/elements/gstmultiqueue.c
index eb310f8a11..7eb8a2255d 100644
--- a/plugins/elements/gstmultiqueue.c
+++ b/plugins/elements/gstmultiqueue.c
@@ -966,7 +966,7 @@ gst_multi_queue_chain (GstPad * pad, GstBuffer * buffer)
GstClockTime timestamp, duration;
sq = gst_pad_get_element_private (pad);
- mq = (GstMultiQueue *) gst_pad_get_parent (pad);
+ mq = sq->mqueue;
/* Get a unique incrementing id */
GST_MULTI_QUEUE_MUTEX_LOCK (mq);
@@ -989,8 +989,6 @@ gst_multi_queue_chain (GstPad * pad, GstBuffer * buffer)
apply_buffer (mq, sq, timestamp, duration, &sq->sink_segment);
done:
- gst_object_unref (mq);
-
return ret;
/* ERRORS */