summaryrefslogtreecommitdiffstats
path: root/tests/check/elements
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.net>2006-06-16 15:17:44 +0000
committerTim-Philipp Müller <tim@centricular.net>2006-06-16 15:17:44 +0000
commitab841287a7e1a3783f2e37b18730b028dbdfcfd7 (patch)
treef2dec6f539f33b21637632c5db8a7b1cb0192b6b /tests/check/elements
parent384fe0bda8cd99c6d64168c73cd6ca433cfa0a24 (diff)
downloadgst-plugins-bad-ab841287a7e1a3783f2e37b18730b028dbdfcfd7.tar.gz
gst-plugins-bad-ab841287a7e1a3783f2e37b18730b028dbdfcfd7.tar.bz2
gst-plugins-bad-ab841287a7e1a3783f2e37b18730b028dbdfcfd7.zip
gst/audioresample/gstaudioresample.c: Implement GstBaseTransform::start and ::stop so that audioresample can clear it...
Original commit message from CVS: * gst/audioresample/gstaudioresample.c: (gst_audioresample_class_init), (gst_audioresample_init), (audioresample_start), (audioresample_stop), (gst_audioresample_set_property), (gst_audioresample_get_property): Implement GstBaseTransform::start and ::stop so that audioresample can clear its internal state properly and be reused insted of causing non-negotiated errors with playbin under some circumstances (#342789). * tests/check/elements/audioresample.c: (setup_audioresample), (cleanup_audioresample): Need to set element state here so that ::start and ::stop are called.
Diffstat (limited to 'tests/check/elements')
-rw-r--r--tests/check/elements/audioresample.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/check/elements/audioresample.c b/tests/check/elements/audioresample.c
index 3d6a7513..2441530a 100644
--- a/tests/check/elements/audioresample.c
+++ b/tests/check/elements/audioresample.c
@@ -69,6 +69,10 @@ setup_audioresample (int channels, int inrate, int outrate)
"rate", G_TYPE_INT, inrate, NULL);
fail_unless (gst_caps_is_fixed (caps));
+ fail_unless (gst_element_set_state (audioresample,
+ GST_STATE_PAUSED) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to paused");
+
mysrcpad = gst_check_setup_src_pad (audioresample, &srctemplate, caps);
pad = gst_pad_get_peer (mysrcpad);
gst_pad_set_caps (pad, caps);
@@ -100,6 +104,9 @@ cleanup_audioresample (GstElement * audioresample)
{
GST_DEBUG ("cleanup_audioresample");
+ fail_unless (gst_element_set_state (audioresample,
+ GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS, "could not set to NULL");
+
gst_check_teardown_src_pad (audioresample);
gst_check_teardown_sink_pad (audioresample);
gst_check_teardown_element (audioresample);