diff --git a/subprojects/gst-plugins-base/tests/check/elements/appsrc.c b/subprojects/gst-plugins-base/tests/check/elements/appsrc.c index 732c5d236f..cb306fb36e 100644 --- a/subprojects/gst-plugins-base/tests/check/elements/appsrc.c +++ b/subprojects/gst-plugins-base/tests/check/elements/appsrc.c @@ -705,6 +705,7 @@ appsrc_pad_probe (GstPad * pad, GstPadProbeInfo * info, gpointer user_data) fail_unless_equals_uint64 (GST_BUFFER_DURATION (recvbuf), GST_BUFFER_DURATION (exp_buf)); + gst_buffer_unref (exp_buf); g_list_free1 (*expected); *expected = next; } @@ -817,7 +818,7 @@ GST_START_TEST (test_appsrc_period_with_custom_segment) sample = gst_sample_new (buffer, NULL, &segment, NULL); expected = g_list_append (expected, gst_event_new_segment (&segment)); - expected = g_list_append (expected, buffer); + expected = g_list_append (expected, gst_buffer_ref (buffer)); /* 1st sample includes buffer and segment */ fail_unless (gst_app_src_push_sample (GST_APP_SRC (src), sample) @@ -832,7 +833,7 @@ GST_START_TEST (test_appsrc_period_with_custom_segment) buffer = gst_buffer_new_and_alloc (4); GST_BUFFER_DTS (buffer) = GST_BUFFER_PTS (buffer) = j * GST_SECOND; GST_BUFFER_DURATION (buffer) = GST_SECOND; - expected = g_list_append (expected, buffer); + expected = g_list_append (expected, gst_buffer_ref (buffer)); fail_unless (gst_app_src_push_buffer (GST_APP_SRC (src), buffer) == GST_FLOW_OK); } @@ -869,7 +870,7 @@ GST_START_TEST (test_appsrc_period_with_custom_segment) sample = gst_sample_new (buffer, NULL, &segment, NULL); expected = g_list_append (expected, gst_event_new_segment (&segment)); - expected = g_list_append (expected, buffer); + expected = g_list_append (expected, gst_buffer_ref (buffer)); /* 1st sample includes buffer and segment */ fail_unless (gst_app_src_push_sample (GST_APP_SRC (src), sample) @@ -884,7 +885,7 @@ GST_START_TEST (test_appsrc_period_with_custom_segment) buffer = gst_buffer_new_and_alloc (4); GST_BUFFER_DTS (buffer) = GST_BUFFER_PTS (buffer) = j * GST_SECOND; GST_BUFFER_DURATION (buffer) = GST_SECOND; - expected = g_list_append (expected, buffer); + expected = g_list_append (expected, gst_buffer_ref (buffer)); fail_unless (gst_app_src_push_buffer (GST_APP_SRC (src), buffer) == GST_FLOW_OK); } @@ -999,7 +1000,7 @@ GST_START_TEST (test_appsrc_custom_segment_twice) } else { sample = gst_sample_new (buffer, NULL, &segment, NULL); expected = g_list_append (expected, gst_event_new_segment (&segment)); - expected = g_list_append (expected, buffer); + expected = g_list_append (expected, gst_buffer_ref (buffer)); } /* PUSH THE FIRST SAMPLE */ fail_unless (gst_app_src_push_sample (GST_APP_SRC (src), sample) @@ -1024,11 +1025,11 @@ GST_START_TEST (test_appsrc_custom_segment_twice) if (tc == 0 || tc == 1) { /* Test Case 0 or 1: Push a sample with duplicated segment */ sample = gst_sample_new (buffer, NULL, &segment, NULL); - expected = g_list_append (expected, buffer); + expected = g_list_append (expected, gst_buffer_ref (buffer)); } else { sample = gst_sample_new (buffer, NULL, &segment, NULL); expected = g_list_append (expected, gst_event_new_segment (&segment)); - expected = g_list_append (expected, buffer); + expected = g_list_append (expected, gst_buffer_ref (buffer)); } fail_unless (gst_app_src_push_sample (GST_APP_SRC (src), sample)