mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-19 13:55:41 +00:00
tests: fix metadata not writable warnings in interleave and deinterleave tests
This commit is contained in:
parent
df2c773e7d
commit
a18164d56e
2 changed files with 3 additions and 11 deletions
|
@ -401,15 +401,14 @@ src_handoff_float32_8ch (GstElement * src, GstBuffer * buf, GstPad * pad,
|
|||
GST_BUFFER_OFFSET (buf) = 0;
|
||||
GST_BUFFER_TIMESTAMP (buf) = 0;
|
||||
|
||||
GST_BUFFER_CAPS (buf) = caps;
|
||||
|
||||
for (i = 0; i < SAMPLES_PER_BUFFER; ++i) {
|
||||
for (c = 0; c < NUM_CHANNELS; ++c) {
|
||||
*data = (gfloat) ((i * NUM_CHANNELS) + c);
|
||||
++data;
|
||||
}
|
||||
}
|
||||
|
||||
gst_buffer_set_caps (buf, caps);
|
||||
gst_caps_unref (caps);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
|
@ -377,11 +377,8 @@ src_handoff_float32 (GstElement * element, GstBuffer * buffer, GstPad * pad,
|
|||
gpointer user_data)
|
||||
{
|
||||
gint n = GPOINTER_TO_INT (user_data);
|
||||
|
||||
GstCaps *caps;
|
||||
|
||||
gfloat *data;
|
||||
|
||||
gint i;
|
||||
|
||||
if (GST_PAD_CAPS (pad))
|
||||
|
@ -414,8 +411,7 @@ src_handoff_float32 (GstElement * element, GstBuffer * buffer, GstPad * pad,
|
|||
GST_BUFFER_OFFSET_END (buffer) = GST_BUFFER_OFFSET_NONE;
|
||||
GST_BUFFER_DURATION (buffer) = GST_SECOND;
|
||||
|
||||
gst_buffer_set_caps (buffer, caps);
|
||||
gst_caps_unref (caps);
|
||||
GST_BUFFER_CAPS (buffer) = caps;
|
||||
|
||||
for (i = 0; i < 48000; i++)
|
||||
data[i] = (n % 2 == 0) ? -1.0 : 1.0;
|
||||
|
@ -426,11 +422,8 @@ sink_handoff_float32 (GstElement * element, GstBuffer * buffer, GstPad * pad,
|
|||
gpointer user_data)
|
||||
{
|
||||
gint i;
|
||||
|
||||
gfloat *data;
|
||||
|
||||
GstCaps *caps;
|
||||
|
||||
gint n = GPOINTER_TO_INT (user_data);
|
||||
|
||||
fail_unless (GST_IS_BUFFER (buffer));
|
||||
|
|
Loading…
Reference in a new issue