mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-26 17:18:15 +00:00
check/Makefile.am: instate more valgrindable tests
Original commit message from CVS: 2005-07-12 Thomas Vander Stichele <thomas at apestaart dot org> * check/Makefile.am: instate more valgrindable tests * check/elements/gstfakesrc.c: (chain_func), (event_func), (GST_START_TEST), (fakesrc_suite): * check/gst/gstpad.c: (GST_START_TEST): * check/gst/gststructure.c: (GST_START_TEST): fix test leaks * docs/gst/tmpl/gstminiobject.sgml: * gst/gstpad.c: (gst_pad_finalize): fix the static mutex leak
This commit is contained in:
parent
0794b693d9
commit
b7e7148a4c
11 changed files with 60 additions and 8 deletions
13
ChangeLog
13
ChangeLog
|
@ -1,3 +1,16 @@
|
|||
2005-07-12 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
* check/Makefile.am:
|
||||
instate more valgrindable tests
|
||||
* check/elements/gstfakesrc.c: (chain_func), (event_func),
|
||||
(GST_START_TEST), (fakesrc_suite):
|
||||
* check/gst/gstpad.c: (GST_START_TEST):
|
||||
* check/gst/gststructure.c: (GST_START_TEST):
|
||||
fix test leaks
|
||||
* docs/gst/tmpl/gstminiobject.sgml:
|
||||
* gst/gstpad.c: (gst_pad_finalize):
|
||||
fix the static mutex leak
|
||||
|
||||
2005-07-11 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
* check/Makefile.am:
|
||||
|
|
|
@ -70,11 +70,8 @@ gst_libs_gdp_CFLAGS = $(AM_CFLAGS) -DGST_ENABLE_NEW
|
|||
TESTS_TO_FIX = \
|
||||
gst/gstghostpad \
|
||||
gst/gstiterator \
|
||||
gst/gstpad \
|
||||
gst/gstsystemclock \
|
||||
gst/gststructure \
|
||||
gst/gsttag \
|
||||
elements/gstfakesrc \
|
||||
pipelines/cleanup \
|
||||
pipelines/simple_launch_lines \
|
||||
gst-libs/gdp
|
||||
|
|
|
@ -49,9 +49,11 @@ event_func (GstPad * pad, GstEvent * event)
|
|||
GST_STREAM_LOCK (pad);
|
||||
have_eos = TRUE;
|
||||
GST_STREAM_UNLOCK (pad);
|
||||
gst_event_unref (event);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gst_event_unref (event);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -93,6 +95,13 @@ GST_START_TEST (test_num_buffers)
|
|||
fail_unless (g_list_length (buffers) == 3);
|
||||
g_list_foreach (buffers, (GFunc) gst_mini_object_unref, NULL);
|
||||
g_list_free (buffers);
|
||||
|
||||
/* cleanup */
|
||||
fail_unless (gst_element_set_state (src, GST_STATE_NULL) == GST_STATE_SUCCESS,
|
||||
"could not set to null");
|
||||
|
||||
gst_object_unref (src);
|
||||
gst_object_unref (sinkpad);
|
||||
}
|
||||
|
||||
GST_END_TEST;
|
||||
|
|
|
@ -31,21 +31,32 @@ GST_START_TEST (test_link)
|
|||
|
||||
src = gst_pad_new ("source", GST_PAD_SRC);
|
||||
fail_if (src == NULL);
|
||||
ASSERT_OBJECT_REFCOUNT (src, "source pad", 1);
|
||||
|
||||
name = gst_pad_get_name (src);
|
||||
fail_unless (strcmp (name, "source") == 0);
|
||||
ASSERT_OBJECT_REFCOUNT (src, "source pad", 1);
|
||||
g_free (name);
|
||||
|
||||
sink = gst_pad_new ("sink", GST_PAD_SINK);
|
||||
fail_if (sink == NULL);
|
||||
|
||||
/* linking without templates or caps should fail */
|
||||
ret = gst_pad_link (src, sink);
|
||||
ASSERT_OBJECT_REFCOUNT (src, "source pad", 1);
|
||||
ASSERT_OBJECT_REFCOUNT (sink, "sink pad", 1);
|
||||
fail_unless (ret == GST_PAD_LINK_NOFORMAT);
|
||||
|
||||
ASSERT_CRITICAL (gst_pad_get_pad_template (NULL));
|
||||
|
||||
srct = gst_pad_get_pad_template (src);
|
||||
fail_unless (srct == NULL);
|
||||
ASSERT_OBJECT_REFCOUNT (src, "source pad", 1);
|
||||
|
||||
/* clean up */
|
||||
ASSERT_OBJECT_REFCOUNT (src, "source pad", 1);
|
||||
gst_object_unref (src);
|
||||
gst_object_unref (sink);
|
||||
}
|
||||
|
||||
GST_END_TEST;
|
||||
|
|
|
@ -60,6 +60,9 @@ GST_START_TEST (test_from_string_int)
|
|||
fail_unless (value == results[i],
|
||||
"Value %d is not the expected result %d for string %s",
|
||||
value, results[i], s);
|
||||
|
||||
/* cleanup */
|
||||
gst_structure_free (structure);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -9,13 +9,11 @@ GstMiniObject
|
|||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### STRUCT GstMiniObject ##### -->
|
||||
<para>
|
||||
|
||||
|
|
|
@ -270,6 +270,7 @@ gst_pad_finalize (GObject * object)
|
|||
|
||||
if (pad->stream_rec_lock) {
|
||||
g_static_rec_mutex_free (pad->stream_rec_lock);
|
||||
g_free (pad->stream_rec_lock);
|
||||
pad->stream_rec_lock = NULL;
|
||||
}
|
||||
if (pad->preroll_lock) {
|
||||
|
|
|
@ -70,11 +70,8 @@ gst_libs_gdp_CFLAGS = $(AM_CFLAGS) -DGST_ENABLE_NEW
|
|||
TESTS_TO_FIX = \
|
||||
gst/gstghostpad \
|
||||
gst/gstiterator \
|
||||
gst/gstpad \
|
||||
gst/gstsystemclock \
|
||||
gst/gststructure \
|
||||
gst/gsttag \
|
||||
elements/gstfakesrc \
|
||||
pipelines/cleanup \
|
||||
pipelines/simple_launch_lines \
|
||||
gst-libs/gdp
|
||||
|
|
|
@ -49,9 +49,11 @@ event_func (GstPad * pad, GstEvent * event)
|
|||
GST_STREAM_LOCK (pad);
|
||||
have_eos = TRUE;
|
||||
GST_STREAM_UNLOCK (pad);
|
||||
gst_event_unref (event);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gst_event_unref (event);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -93,6 +95,13 @@ GST_START_TEST (test_num_buffers)
|
|||
fail_unless (g_list_length (buffers) == 3);
|
||||
g_list_foreach (buffers, (GFunc) gst_mini_object_unref, NULL);
|
||||
g_list_free (buffers);
|
||||
|
||||
/* cleanup */
|
||||
fail_unless (gst_element_set_state (src, GST_STATE_NULL) == GST_STATE_SUCCESS,
|
||||
"could not set to null");
|
||||
|
||||
gst_object_unref (src);
|
||||
gst_object_unref (sinkpad);
|
||||
}
|
||||
|
||||
GST_END_TEST;
|
||||
|
|
|
@ -31,21 +31,32 @@ GST_START_TEST (test_link)
|
|||
|
||||
src = gst_pad_new ("source", GST_PAD_SRC);
|
||||
fail_if (src == NULL);
|
||||
ASSERT_OBJECT_REFCOUNT (src, "source pad", 1);
|
||||
|
||||
name = gst_pad_get_name (src);
|
||||
fail_unless (strcmp (name, "source") == 0);
|
||||
ASSERT_OBJECT_REFCOUNT (src, "source pad", 1);
|
||||
g_free (name);
|
||||
|
||||
sink = gst_pad_new ("sink", GST_PAD_SINK);
|
||||
fail_if (sink == NULL);
|
||||
|
||||
/* linking without templates or caps should fail */
|
||||
ret = gst_pad_link (src, sink);
|
||||
ASSERT_OBJECT_REFCOUNT (src, "source pad", 1);
|
||||
ASSERT_OBJECT_REFCOUNT (sink, "sink pad", 1);
|
||||
fail_unless (ret == GST_PAD_LINK_NOFORMAT);
|
||||
|
||||
ASSERT_CRITICAL (gst_pad_get_pad_template (NULL));
|
||||
|
||||
srct = gst_pad_get_pad_template (src);
|
||||
fail_unless (srct == NULL);
|
||||
ASSERT_OBJECT_REFCOUNT (src, "source pad", 1);
|
||||
|
||||
/* clean up */
|
||||
ASSERT_OBJECT_REFCOUNT (src, "source pad", 1);
|
||||
gst_object_unref (src);
|
||||
gst_object_unref (sink);
|
||||
}
|
||||
|
||||
GST_END_TEST;
|
||||
|
|
|
@ -60,6 +60,9 @@ GST_START_TEST (test_from_string_int)
|
|||
fail_unless (value == results[i],
|
||||
"Value %d is not the expected result %d for string %s",
|
||||
value, results[i], s);
|
||||
|
||||
/* cleanup */
|
||||
gst_structure_free (structure);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue