fail_unless_equals_uint64 (GST_BUFFER_DURATION (recvbuf),
GST_BUFFER_DURATION (exp_buf));
+ gst_buffer_unref (exp_buf);
g_list_free1 (*expected);
*expected = next;
}
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)
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);
}
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)
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);
}
} 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)
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)