diff options
author | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2010-03-11 18:51:40 +0300 |
---|---|---|
committer | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2010-03-11 18:51:40 +0300 |
commit | a18164d56ef2b718a5746ce23ba054bfd0f4d508 (patch) | |
tree | db060a2aaabe96785b17c4e4ab43af5e42590c46 /tests | |
parent | df2c773e7da8faa78d2e6edd41e1ee6b7a4e5a95 (diff) |
tests: fix metadata not writable warnings in interleave and deinterleave tests
Diffstat (limited to 'tests')
-rw-r--r-- | tests/check/elements/deinterleave.c | 5 | ||||
-rw-r--r-- | tests/check/elements/interleave.c | 9 |
2 files changed, 3 insertions, 11 deletions
diff --git a/tests/check/elements/deinterleave.c b/tests/check/elements/deinterleave.c index 5a5c3f2c1..3a0eb0c38 100644 --- a/tests/check/elements/deinterleave.c +++ b/tests/check/elements/deinterleave.c @@ -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 diff --git a/tests/check/elements/interleave.c b/tests/check/elements/interleave.c index e2fb55880..081fad7ac 100644 --- a/tests/check/elements/interleave.c +++ b/tests/check/elements/interleave.c @@ -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)); |