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:
a5246f9
)
element: Add guard to gst_element_release_pad() to ensure the pad belongs to this...
author
Sebastian Dröge
<sebastian@centricular.com>
Thu, 22 Dec 2016 10:05:56 +0000
(12:05 +0200)
committer
Sebastian Dröge
<sebastian@centricular.com>
Thu, 22 Dec 2016 10:08:14 +0000
(12:08 +0200)
It's a programming error to pass other pads here, and it easily causes
crashes or other problematic behaviour down the road as subclasses
usually assume to only get their pads.
gst/gstelement.c
patch
|
blob
|
history
diff --git
a/gst/gstelement.c
b/gst/gstelement.c
index
4ff9c67
..
a7aa591
100644
(file)
--- a/
gst/gstelement.c
+++ b/
gst/gstelement.c
@@
-345,6
+345,7
@@
gst_element_release_request_pad (GstElement * element, GstPad * pad)
g_return_if_fail (GST_PAD_PAD_TEMPLATE (pad) == NULL ||
GST_PAD_TEMPLATE_PRESENCE (GST_PAD_PAD_TEMPLATE (pad)) ==
GST_PAD_REQUEST);
+ g_return_if_fail (GST_PAD_PARENT (pad) == element);
oclass = GST_ELEMENT_GET_CLASS (element);