From 96e342b6868da04ff43d85fe635bf61686b385e3 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 5 Aug 2009 13:48:40 +0200 Subject: [PATCH] tests: don't set caps on unwritable buffers Take the ref after setting the caps on a buffer because else the buffer is techinically not writable. --- tests/check/gst/gstpad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/check/gst/gstpad.c b/tests/check/gst/gstpad.c index a3a6f67667..832287af4b 100644 --- a/tests/check/gst/gstpad.c +++ b/tests/check/gst/gstpad.c @@ -580,8 +580,8 @@ GST_START_TEST (test_push_negotiation) /* Should fail if src pad caps are incompatible with sink pad caps */ gst_pad_set_caps (src, caps); - gst_buffer_ref (buffer); gst_buffer_set_caps (buffer, caps); + gst_buffer_ref (buffer); fail_unless (gst_pad_push (src, buffer) == GST_FLOW_NOT_NEGOTIATED); ASSERT_MINI_OBJECT_REFCOUNT (buffer, "buffer", 1); gst_buffer_unref (buffer);