From f7b6b6129e9682238d83a9b5f7eaea4101fee233 Mon Sep 17 00:00:00 2001 From: Johan Dahlin Date: Tue, 15 Nov 2005 19:56:51 +0000 Subject: [PATCH] fix caps leak Original commit message from CVS: fix caps leak --- ext/ogg/gstoggdemux.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ext/ogg/gstoggdemux.c b/ext/ogg/gstoggdemux.c index 38ed287c89..cd5ebc9d30 100644 --- a/ext/ogg/gstoggdemux.c +++ b/ext/ogg/gstoggdemux.c @@ -2613,7 +2613,11 @@ ogg_find_suggest (gpointer data, guint probability, const GstCaps * caps) OggTypeFind *find = (OggTypeFind *) data; if (probability > find->best_probability) { - gst_caps_replace (&find->caps, gst_caps_copy (caps)); + GstCaps *copy = gst_caps_copy (caps); + + gst_caps_replace (&find->caps, copy); + gst_caps_unref (copy); + find->best_probability = probability; } }