audioencoder: gst_pad_get_pad_template_caps() now returns a new reference, don't...
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Wed, 1 Feb 2012 15:33:30 +0000 (16:33 +0100)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Wed, 1 Feb 2012 15:33:30 +0000 (16:33 +0100)
gst-libs/gst/audio/gstaudioencoder.c

index 689df06..e9b5d1a 100644 (file)
@@ -1155,7 +1155,7 @@ refuse_caps:
 GstCaps *
 gst_audio_encoder_proxy_getcaps (GstAudioEncoder * enc, GstCaps * caps)
 {
-  const GstCaps *templ_caps;
+  GstCaps *templ_caps = NULL;
   GstCaps *allowed = NULL;
   GstCaps *fcaps, *filter_caps;
   gint i, j;
@@ -1212,6 +1212,7 @@ gst_audio_encoder_proxy_getcaps (GstAudioEncoder * enc, GstCaps * caps)
   gst_caps_unref (filter_caps);
 
 done:
+  gst_caps_replace (&templ_caps, NULL);
   gst_caps_replace (&allowed, NULL);
 
   GST_LOG_OBJECT (enc, "proxy caps %" GST_PTR_FORMAT, fcaps);