diff --git a/gst/elements/gsttee.c b/gst/elements/gsttee.c index 1b2eba0f19..1db945c07c 100644 --- a/gst/elements/gsttee.c +++ b/gst/elements/gsttee.c @@ -198,7 +198,7 @@ gst_tee_getcaps (GstPad *pad, GstCaps *filter) peercaps = gst_pad_get_caps (peer); newcaps = gst_caps_intersect (caps, peercaps); gst_caps_unref (caps); - gst_caps_unref (peercaps); + gst_caps_sink (peercaps); caps = newcaps; } diff --git a/plugins/elements/gsttee.c b/plugins/elements/gsttee.c index 1b2eba0f19..1db945c07c 100644 --- a/plugins/elements/gsttee.c +++ b/plugins/elements/gsttee.c @@ -198,7 +198,7 @@ gst_tee_getcaps (GstPad *pad, GstCaps *filter) peercaps = gst_pad_get_caps (peer); newcaps = gst_caps_intersect (caps, peercaps); gst_caps_unref (caps); - gst_caps_unref (peercaps); + gst_caps_sink (peercaps); caps = newcaps; }