projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3c2abf5
)
basesrc: Don't use expensive cast checks in get_range.
author
Edward Hervey
<bilboed@bilboed.com>
Wed, 17 Feb 2010 11:14:09 +0000
(12:14 +0100)
committer
Edward Hervey
<bilboed@bilboed.com>
Wed, 17 Feb 2010 11:36:57 +0000
(12:36 +0100)
_get_range() is a pad function set by ourselves, therefore we're certain that
the parent is a GstBaseSrc.
Speeds up _get_range by 38%, and the total call by 30%. (valgrind instruction
calls measurements).
Fixes #610246
libs/gst/base/gstbasesrc.c
patch
|
blob
|
history
diff --git
a/libs/gst/base/gstbasesrc.c
b/libs/gst/base/gstbasesrc.c
index
8f53184
..
dd71ffd
100644
(file)
--- a/
libs/gst/base/gstbasesrc.c
+++ b/
libs/gst/base/gstbasesrc.c
@@
-2206,7
+2206,7
@@
gst_base_src_pad_get_range (GstPad * pad, guint64 offset, guint length,
GstBaseSrc *src;
GstFlowReturn res;
- src = GST_BASE_SRC
(gst_pad_get_parent (pad
));
+ src = GST_BASE_SRC
_CAST (gst_object_ref (GST_OBJECT_PARENT (pad)
));
GST_LIVE_LOCK (src);
if (G_UNLIKELY (src->priv->flushing))