fix for caps _normalize changes
authorWim Taymans <wim.taymans@collabora.co.uk>
Mon, 12 Mar 2012 11:23:15 +0000 (12:23 +0100)
committerWim Taymans <wim.taymans@collabora.co.uk>
Mon, 12 Mar 2012 11:23:15 +0000 (12:23 +0100)
ext/jpeg/gstjpegdec.c
tests/check/elements/videocrop.c
tests/check/elements/videofilter.c

index 8e7b9f7..203a2e8 100644 (file)
@@ -1258,11 +1258,10 @@ gst_jpeg_dec_negotiate (GstJpegDec * dec, gint width, gint height, gint clrspc)
       GST_DEBUG_OBJECT (dec, "... but no peer, using template caps");
       /* need to copy because get_allowed_caps returns a ref,
        * and get_pad_template_caps doesn't */
-      caps = gst_caps_copy (gst_pad_get_pad_template_caps (dec->srcpad));
+      caps = gst_pad_get_pad_template_caps (dec->srcpad);
     }
     /* avoid lists of formats, etc */
     allowed_caps = gst_caps_normalize (caps);
-    gst_caps_unref (caps);
     caps = NULL;
     GST_LOG_OBJECT (dec, "allowed source caps %" GST_PTR_FORMAT, allowed_caps);
 
index 8e60adc..0f3234a 100644 (file)
@@ -47,7 +47,6 @@ video_crop_get_test_caps (GstElement * videocrop)
   fail_unless (templ != NULL);
 
   allowed_caps = gst_caps_normalize (templ);
-  gst_caps_unref (templ);
 
   for (i = 0; i < gst_caps_get_size (allowed_caps); ++i) {
     GstStructure *new_structure;
index c7c8afc..6feca6d 100644 (file)
@@ -141,7 +141,6 @@ check_filter (const gchar * name, gint num_buffers, const gchar * prop, ...)
   va_list varargs;
 
   allcaps = gst_caps_normalize (templ);
-  gst_caps_unref (templ);
 
   n = gst_caps_get_size (allcaps);