mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
check: Ref buffers after setting caps on them
Reffing makes metadata unwritable, so we need to set the caps before.
This commit is contained in:
parent
06b516ab47
commit
9b5ef584e2
1 changed files with 4 additions and 3 deletions
|
@ -180,9 +180,6 @@ gst_multifdsink_create_streamheader (const gchar * data1,
|
||||||
*hbuf2 = gst_buffer_new_and_alloc (size2);
|
*hbuf2 = gst_buffer_new_and_alloc (size2);
|
||||||
GST_BUFFER_FLAG_SET (*hbuf2, GST_BUFFER_FLAG_IN_CAPS);
|
GST_BUFFER_FLAG_SET (*hbuf2, GST_BUFFER_FLAG_IN_CAPS);
|
||||||
memcpy (GST_BUFFER_DATA (*hbuf2), data2, size2);
|
memcpy (GST_BUFFER_DATA (*hbuf2), data2, size2);
|
||||||
/* we want to keep them around for the tests */
|
|
||||||
gst_buffer_ref (*hbuf1);
|
|
||||||
gst_buffer_ref (*hbuf2);
|
|
||||||
|
|
||||||
g_value_init (&array, GST_TYPE_ARRAY);
|
g_value_init (&array, GST_TYPE_ARRAY);
|
||||||
|
|
||||||
|
@ -215,6 +212,10 @@ gst_multifdsink_create_streamheader (const gchar * data1,
|
||||||
gst_buffer_set_caps (*hbuf2, *caps);
|
gst_buffer_set_caps (*hbuf2, *caps);
|
||||||
ASSERT_CAPS_REFCOUNT (*caps, "streamheader caps", 3);
|
ASSERT_CAPS_REFCOUNT (*caps, "streamheader caps", 3);
|
||||||
|
|
||||||
|
/* we want to keep them around for the tests */
|
||||||
|
gst_buffer_ref (*hbuf1);
|
||||||
|
gst_buffer_ref (*hbuf2);
|
||||||
|
|
||||||
GST_DEBUG ("created streamheader caps %p %" GST_PTR_FORMAT, *caps, *caps);
|
GST_DEBUG ("created streamheader caps %p %" GST_PTR_FORMAT, *caps, *caps);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue