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:
12247a9
)
tee: Don't crash if there is no source pad
author
Olivier CrĂȘte
<olivier.crete@collabora.co.uk>
Tue, 22 Dec 2009 20:29:26 +0000
(15:29 -0500)
committer
Wim Taymans
<wim@metal.(none)>
Tue, 22 Dec 2009 21:31:06 +0000
(22:31 +0100)
plugins/elements/gsttee.c
patch
|
blob
|
history
diff --git
a/plugins/elements/gsttee.c
b/plugins/elements/gsttee.c
index
7a3bf1d
..
cd59467
100644
(file)
--- a/
plugins/elements/gsttee.c
+++ b/
plugins/elements/gsttee.c
@@
-664,6
+664,16
@@
gst_tee_handle_data (GstTee * tee, gpointer data, gboolean is_list)
GST_OBJECT_LOCK (tee);
pads = GST_ELEMENT_CAST (tee)->srcpads;
+ /* special case for zero pads */
+ if (!pads) {
+ GST_OBJECT_UNLOCK (tee);
+ if (is_list)
+ gst_buffer_list_unref (data);
+ else
+ gst_buffer_unref (data);
+ return GST_FLOW_NOT_LINKED;
+ }
+
/* special case for just one pad that avoids reffing the buffer */
if (!pads->next) {
GstPad *pad = GST_PAD_CAST (pads->data);