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:
d04c8b6
)
tee: Keep another ref to our one and only srcpad around while pushing
author
Sebastian Dröge
<sebastian@centricular.com>
Thu, 2 Jan 2014 10:09:59 +0000
(11:09 +0100)
committer
Sebastian Dröge
<sebastian@centricular.com>
Thu, 2 Jan 2014 10:09:59 +0000
(11:09 +0100)
A pad probe on that pad might otherwise just release the pad, drop
the last reference and cause great misery.
https://bugzilla.gnome.org/show_bug.cgi?id=721300
plugins/elements/gsttee.c
patch
|
blob
|
history
diff --git
a/plugins/elements/gsttee.c
b/plugins/elements/gsttee.c
index
a6d4b9d
..
4231563
100644
(file)
--- a/
plugins/elements/gsttee.c
+++ b/
plugins/elements/gsttee.c
@@
-591,6
+591,9
@@
gst_tee_handle_data (GstTee * tee, gpointer data, gboolean is_list)
if (!pads->next) {
GstPad *pad = GST_PAD_CAST (pads->data);
+ /* Keep another ref around, a pad probe
+ * might release and destroy the pad */
+ gst_object_ref (pad);
GST_OBJECT_UNLOCK (tee);
if (pad == tee->pull_pad) {
@@
-600,6
+603,9
@@
gst_tee_handle_data (GstTee * tee, gpointer data, gboolean is_list)
} else {
ret = gst_pad_push (pad, GST_BUFFER_CAST (data));
}
+
+ gst_object_unref (pad);
+
return ret;
}