}
if (in_seg) {
+ /* about to change metadata */
+ buffer = gst_buffer_make_writable (buffer);
if (GST_BUFFER_TIMESTAMP_IS_VALID (buffer))
GST_BUFFER_TIMESTAMP (buffer) = clip_start;
else if (GST_BUFFER_DURATION_IS_VALID (buffer))
fail_unless_equals_int (g_list_length (buffers), 1);
/* text should still be stuck in textoverlay */
- ASSERT_BUFFER_REFCOUNT (tbuf, "tbuf", 2);
+ ASSERT_MINI_OBJECT_REFCOUNT (gst_buffer_peek_memory (tbuf, 0), "tbuf-mem", 2);
/* there should be no text rendered */
outbuffer = GST_BUFFER_CAST (buffers->data);
fail_unless_equals_int (g_list_length (buffers), 2);
/* text should still be stuck in textoverlay */
- ASSERT_BUFFER_REFCOUNT (tbuf, "tbuf", 2);
+ ASSERT_MINI_OBJECT_REFCOUNT (gst_buffer_peek_memory (tbuf, 0), "tbuf-mem", 2);
/* there should be text rendered */
outbuffer = GST_BUFFER_CAST (buffers->next->data);
fail_unless (gst_pad_push (myvideosrcpad, inbuffer) == GST_FLOW_OK);
/* but the text should no longer be stuck in textoverlay */
- ASSERT_BUFFER_REFCOUNT (tbuf, "tbuf", 1);
+ ASSERT_MINI_OBJECT_REFCOUNT (gst_buffer_peek_memory (tbuf, 0), "tbuf-mem", 1);
/* video buffer should have gone through after newsegment event */
fail_unless_equals_int (g_list_length (buffers), 3);