diff options
author | Jan Schmidt <thaytan@noraisin.net> | 2009-09-01 12:05:51 +0100 |
---|---|---|
committer | Jan Schmidt <thaytan@noraisin.net> | 2009-09-01 12:08:17 +0100 |
commit | 64fb67f70016046d1b41075f1eade4aab51e69c0 (patch) | |
tree | 80e2437d9c1a7d2c0d48e3ea6ffd08774815e315 | |
parent | 5f8f21cfe51751b7877617106aa6821053018521 (diff) |
gstbin: Don't propagate a NULL cached index to added elements
When an element is added to the bin, only set the index if we have a
cached index, rather than setting a NULL index on elements that might
have a default index object of their own.
-rw-r--r-- | gst/gstbin.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gst/gstbin.c b/gst/gstbin.c index 9bd3b7a117..fde197d1fa 100644 --- a/gst/gstbin.c +++ b/gst/gstbin.c @@ -1043,7 +1043,8 @@ gst_bin_add_func (GstBin * bin, GstElement * element) * a new clock will be selected */ gst_element_set_clock (element, GST_ELEMENT_CLOCK (bin)); /* set the cached index on the children */ - gst_element_set_index (element, bin->priv->index); + if (bin->priv->index) + gst_element_set_index (element, bin->priv->index); ret = GST_STATE_RETURN (bin); /* no need to update the state if we are in error */ |