[gst-cvs] gstreamer: tests: don't set caps on unwritable buffers
Wim Taymans
wtay at kemper.freedesktop.org
Thu Aug 6 02:05:28 PDT 2009
Module: gstreamer
Branch: master
Commit: 96e342b6868da04ff43d85fe635bf61686b385e3
URL: http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=96e342b6868da04ff43d85fe635bf61686b385e3
Author: Wim Taymans <wim.taymans at collabora.co.uk>
Date: Wed Aug 5 13:48:40 2009 +0200
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 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tests/check/gst/gstpad.c b/tests/check/gst/gstpad.c
index a3a6f67..832287a 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);
More information about the Gstreamer-commits
mailing list