diff --git a/tests/check/elements/appsrc.c b/tests/check/elements/appsrc.c index b4bd43cf51..7a677f11be 100644 --- a/tests/check/elements/appsrc.c +++ b/tests/check/elements/appsrc.c @@ -66,7 +66,7 @@ GST_START_TEST (test_appsrc_non_null_caps) { GstElement *src; GstBuffer *buffer; - GstCaps *caps; + GstCaps *caps, *ccaps; src = setup_appsrc (); @@ -99,7 +99,9 @@ GST_START_TEST (test_appsrc_non_null_caps) /* Check the output caps */ fail_unless (g_list_length (buffers) == 4); - fail_unless (gst_caps_is_equal (gst_pad_get_current_caps (mysinkpad), caps)); + ccaps = gst_pad_get_current_caps (mysinkpad); + fail_unless (gst_caps_is_equal (ccaps, caps)); + gst_caps_unref (ccaps); ASSERT_SET_STATE (src, GST_STATE_NULL, GST_STATE_CHANGE_SUCCESS); gst_caps_unref (caps); diff --git a/tests/check/elements/audioconvert.c b/tests/check/elements/audioconvert.c index 244ed9b7f9..bfb6e7c0db 100644 --- a/tests/check/elements/audioconvert.c +++ b/tests/check/elements/audioconvert.c @@ -460,9 +460,11 @@ verify_convert (const gchar * which, void *in, int inlength, { GstStructure *in_s, *out_s; gint out_chans; + GstCaps *ccaps; in_s = gst_caps_get_structure (incaps, 0); - out_s = gst_caps_get_structure (gst_pad_get_current_caps (mysinkpad), 0); + ccaps = gst_pad_get_current_caps (mysinkpad); + out_s = gst_caps_get_structure (ccaps, 0); fail_unless (gst_structure_get_int (out_s, "channels", &out_chans)); /* positions for 1 and 2 channels are implicit if not provided */ @@ -472,6 +474,7 @@ verify_convert (const gchar * which, void *in, int inlength, gst_structure_to_string (in_s), gst_structure_to_string (out_s)); } } + gst_caps_unref (ccaps); } buffers = g_list_remove (buffers, outbuffer); @@ -994,8 +997,7 @@ GST_START_TEST (test_multichannel_conversion) get_int_mc_caps (11, G_BYTE_ORDER, 16, 16, TRUE, in_layout); GstCaps *out_caps = get_int_mc_caps (2, G_BYTE_ORDER, 16, 16, TRUE, NULL); - RUN_CONVERSION ("11 channels to 2", in, - gst_caps_copy (in_caps), out, gst_caps_copy (out_caps)); + RUN_CONVERSION ("11 channels to 2", in, in_caps, out, out_caps); } { gint16 in[] = { 0, 0 }; @@ -1017,8 +1019,7 @@ GST_START_TEST (test_multichannel_conversion) GstCaps *out_caps = get_int_mc_caps (11, G_BYTE_ORDER, 16, 16, TRUE, out_layout); - RUN_CONVERSION ("2 channels to 11", in, - gst_caps_copy (in_caps), out, gst_caps_copy (out_caps)); + RUN_CONVERSION ("2 channels to 11", in, in_caps, out, out_caps); } } diff --git a/tests/check/elements/decodebin.c b/tests/check/elements/decodebin.c index 21dc4f4f9d..0de9bc2c1a 100644 --- a/tests/check/elements/decodebin.c +++ b/tests/check/elements/decodebin.c @@ -58,6 +58,7 @@ src_need_data_cb (GstElement * src, guint size, gpointer data) GST_BUFFER_OFFSET (buf) = 0; g_signal_emit_by_name (src, "push-buffer", buf, &ret); + gst_buffer_unref (buf); fail_unless (ret == GST_FLOW_OK); } diff --git a/tests/check/elements/videotestsrc.c b/tests/check/elements/videotestsrc.c index 7d01759d22..4cfe9a7606 100644 --- a/tests/check/elements/videotestsrc.c +++ b/tests/check/elements/videotestsrc.c @@ -214,6 +214,8 @@ got_buf_cb (GstElement * sink, GstBuffer * new_buf, GstPad * pad, if (*p_old_sample) gst_sample_unref (*p_old_sample); *p_old_sample = gst_sample_new (new_buf, caps, NULL, NULL); + + gst_caps_unref (caps); } /* tests the positioning of pixels within the various RGB pixel layouts */ diff --git a/tests/check/pipelines/capsfilter-renegotiation.c b/tests/check/pipelines/capsfilter-renegotiation.c index feef062a29..781dcbd3ef 100644 --- a/tests/check/pipelines/capsfilter-renegotiation.c +++ b/tests/check/pipelines/capsfilter-renegotiation.c @@ -80,6 +80,7 @@ buffer_probe (GstPad * pad, GstPadProbeInfo * info, gpointer data) } } } + gst_caps_unref (pad_caps); return TRUE; }