tests: flvmux: Fix flvmux's tests after fix for request pads handling

Now that flvmux doesn't release its request pads on PAUSED->READY the
test doesn't need to re-request them for every reuse test start.
This commit is contained in:
Thiago Santos 2011-09-12 09:21:47 -03:00
parent 261d11a6d7
commit c78048bc25

View file

@ -50,6 +50,7 @@ static void
mux_pcm_audio (guint num_buffers, guint repeat)
{
GstElement *src, *sink, *flvmux, *conv, *pipeline;
GstPad *sinkpad, *srcpad;
gint counter;
GST_LOG ("num_buffers = %u", num_buffers);
@ -83,25 +84,24 @@ mux_pcm_audio (guint num_buffers, guint repeat)
fail_unless (gst_element_link (src, conv));
fail_unless (gst_element_link (flvmux, sink));
/* now link the elements */
sinkpad = gst_element_get_request_pad (flvmux, "audio");
fail_unless (sinkpad != NULL, "Could not get audio request pad");
srcpad = gst_element_get_static_pad (conv, "src");
fail_unless (srcpad != NULL, "Could not get audioconvert's source pad");
fail_unless_equals_int (gst_pad_link (srcpad, sinkpad), GST_PAD_LINK_OK);
gst_object_unref (srcpad);
gst_object_unref (sinkpad);
do {
GstStateChangeReturn state_ret;
GstMessage *msg;
GstPad *sinkpad, *srcpad;
GST_LOG ("repeat=%d", repeat);
/* now link the elements */
sinkpad = gst_element_get_request_pad (flvmux, "audio");
fail_unless (sinkpad != NULL, "Could not get audio request pad");
srcpad = gst_element_get_static_pad (conv, "src");
fail_unless (srcpad != NULL, "Could not get audioconvert's source pad");
fail_unless_equals_int (gst_pad_link (srcpad, sinkpad), GST_PAD_LINK_OK);
gst_object_unref (srcpad);
gst_object_unref (sinkpad);
counter = 0;
state_ret = gst_element_set_state (pipeline, GST_STATE_PAUSED);