From f7eb58c23544445d8fed270161e9e51dc192bd9d Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Mon, 21 Aug 2006 13:12:47 +0000 Subject: [PATCH] tests/check/elements/audiopanorama.c: Fix invalid memory access in audiopanorama test suite. Original commit message from CVS: * tests/check/elements/audiopanorama.c: (GST_START_TEST): Fix invalid memory access in audiopanorama test suite. --- ChangeLog | 5 +++++ tests/check/elements/audiopanorama.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 9fcc70a208..56eeb984f7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-08-21 Jan Schmidt + + * tests/check/elements/audiopanorama.c: (GST_START_TEST): + Fix invalid memory access in audiopanorama test suite. + 2006-08-21 Edward Hervey * tests/check/elements/.cvsignore: diff --git a/tests/check/elements/audiopanorama.c b/tests/check/elements/audiopanorama.c index 4b7b66d2b5..666add9e7f 100644 --- a/tests/check/elements/audiopanorama.c +++ b/tests/check/elements/audiopanorama.c @@ -271,7 +271,9 @@ GST_START_TEST (test_stereo_middle) gst_caps_unref (caps); ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1); - /* pushing gives away my reference ... */ + /* pushing gives away my reference ... so keep an extra one */ + gst_buffer_ref (inbuffer); + fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK); /* ... but it ends up being collected on the global buffer list */ fail_unless_equals_int (g_list_length (buffers), 1); @@ -283,6 +285,7 @@ GST_START_TEST (test_stereo_middle) fail_unless (memcmp (GST_BUFFER_DATA (outbuffer), in, 8) == 0); /* cleanup */ + gst_buffer_unref (inbuffer); cleanup_panorama (panorama); }