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:
5e4c13f
)
element: don't crash on missing template
author
Wim Taymans
<wim.taymans@collabora.co.uk>
Tue, 31 Jan 2012 15:27:55 +0000
(16:27 +0100)
committer
Wim Taymans
<wim.taymans@collabora.co.uk>
Tue, 31 Jan 2012 15:27:55 +0000
(16:27 +0100)
Some request pads don't have a padtemplate (mostly those from encodebin). Avoid
crashing in this case.
gst/gstelement.c
patch
|
blob
|
history
diff --git
a/gst/gstelement.c
b/gst/gstelement.c
index
30c73f2
..
de0b9f7
100644
(file)
--- a/
gst/gstelement.c
+++ b/
gst/gstelement.c
@@
-316,8
+316,9
@@
gst_element_release_request_pad (GstElement * element, GstPad * pad)
g_return_if_fail (GST_IS_ELEMENT (element));
g_return_if_fail (GST_IS_PAD (pad));
- g_return_if_fail (GST_PAD_TEMPLATE_PRESENCE (GST_PAD_PAD_TEMPLATE (pad))
- == GST_PAD_REQUEST);
+ g_return_if_fail (GST_PAD_PAD_TEMPLATE (pad) == NULL ||
+ GST_PAD_TEMPLATE_PRESENCE (GST_PAD_PAD_TEMPLATE (pad)) ==
+ GST_PAD_REQUEST);
oclass = GST_ELEMENT_GET_CLASS (element);