Commit a18164d5 authored by Tim-Philipp Müller's avatar Tim-Philipp Müller
Browse files

tests: fix metadata not writable warnings in interleave and deinterleave tests

parent df2c773e
......@@ -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));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment