mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
basesrc: Don't use expensive cast checks in get_range.
_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
This commit is contained in:
parent
3c2abf5581
commit
bc9e129990
1 changed files with 1 additions and 1 deletions
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue