fix caps leak

Original commit message from CVS:
fix caps leak
This commit is contained in:
Johan Dahlin 2005-11-15 19:56:51 +00:00
parent e29263ef06
commit f7b6b6129e

View file

@ -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;
}
}