diff --git a/tests/check/elements/audiowsinclimit.c b/tests/check/elements/audiowsinclimit.c index bee834c175..3c5fe31fe6 100644 --- a/tests/check/elements/audiowsinclimit.c +++ b/tests/check/elements/audiowsinclimit.c @@ -129,15 +129,15 @@ GST_START_TEST (test_32_lp_0hz) in[i] = 1.0; gst_buffer_unmap (inbuffer, &map); - /* ensure segment (format) properly setup */ - gst_segment_init (&segment, GST_FORMAT_TIME); - fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_segment (&segment))); - caps = gst_caps_from_string (AUDIO_WSINC_LIMIT_CAPS_STRING_32); gst_pad_set_caps (mysrcpad, caps); gst_caps_unref (caps); ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1); + /* ensure segment (format) properly setup */ + gst_segment_init (&segment, GST_FORMAT_TIME); + fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_segment (&segment))); + /* pushing gives away my reference ... */ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK); fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ())); @@ -200,15 +200,15 @@ GST_START_TEST (test_32_lp_22050hz) } gst_buffer_unmap (inbuffer, &map); - /* ensure segment (format) properly setup */ - gst_segment_init (&segment, GST_FORMAT_TIME); - fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_segment (&segment))); - caps = gst_caps_from_string (AUDIO_WSINC_LIMIT_CAPS_STRING_32); gst_pad_set_caps (mysrcpad, caps); gst_caps_unref (caps); ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1); + /* ensure segment (format) properly setup */ + gst_segment_init (&segment, GST_FORMAT_TIME); + fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_segment (&segment))); + /* pushing gives away my reference ... */ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK); fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ())); @@ -269,15 +269,15 @@ GST_START_TEST (test_32_hp_0hz) in[i] = 1.0; gst_buffer_unmap (inbuffer, &map); - /* ensure segment (format) properly setup */ - gst_segment_init (&segment, GST_FORMAT_TIME); - fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_segment (&segment))); - caps = gst_caps_from_string (AUDIO_WSINC_LIMIT_CAPS_STRING_32); gst_pad_set_caps (mysrcpad, caps); gst_caps_unref (caps); ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1); + /* ensure segment (format) properly setup */ + gst_segment_init (&segment, GST_FORMAT_TIME); + fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_segment (&segment))); + /* pushing gives away my reference ... */ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK); fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ())); @@ -340,15 +340,15 @@ GST_START_TEST (test_32_hp_22050hz) } gst_buffer_unmap (inbuffer, &map); - /* ensure segment (format) properly setup */ - gst_segment_init (&segment, GST_FORMAT_TIME); - fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_segment (&segment))); - caps = gst_caps_from_string (AUDIO_WSINC_LIMIT_CAPS_STRING_32); gst_pad_set_caps (mysrcpad, caps); gst_caps_unref (caps); ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1); + /* ensure segment (format) properly setup */ + gst_segment_init (&segment, GST_FORMAT_TIME); + fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_segment (&segment))); + /* pushing gives away my reference ... */ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK); fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ())); @@ -408,15 +408,15 @@ GST_START_TEST (test_32_small_buffer) in[i] = 1.0; gst_buffer_unmap (inbuffer, &map); - /* ensure segment (format) properly setup */ - gst_segment_init (&segment, GST_FORMAT_TIME); - fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_segment (&segment))); - caps = gst_caps_from_string (AUDIO_WSINC_LIMIT_CAPS_STRING_32); gst_pad_set_caps (mysrcpad, caps); gst_caps_unref (caps); ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1); + /* ensure segment (format) properly setup */ + gst_segment_init (&segment, GST_FORMAT_TIME); + fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_segment (&segment))); + /* pushing gives away my reference ... */ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK); fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ())); @@ -463,15 +463,15 @@ GST_START_TEST (test_64_lp_0hz) in[i] = 1.0; gst_buffer_unmap (inbuffer, &map); - /* ensure segment (format) properly setup */ - gst_segment_init (&segment, GST_FORMAT_TIME); - fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_segment (&segment))); - caps = gst_caps_from_string (AUDIO_WSINC_LIMIT_CAPS_STRING_64); gst_pad_set_caps (mysrcpad, caps); gst_caps_unref (caps); ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1); + /* ensure segment (format) properly setup */ + gst_segment_init (&segment, GST_FORMAT_TIME); + fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_segment (&segment))); + /* pushing gives away my reference ... */ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK); fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ())); @@ -534,15 +534,15 @@ GST_START_TEST (test_64_lp_22050hz) } gst_buffer_unmap (inbuffer, &map); - /* ensure segment (format) properly setup */ - gst_segment_init (&segment, GST_FORMAT_TIME); - fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_segment (&segment))); - caps = gst_caps_from_string (AUDIO_WSINC_LIMIT_CAPS_STRING_64); gst_pad_set_caps (mysrcpad, caps); gst_caps_unref (caps); ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1); + /* ensure segment (format) properly setup */ + gst_segment_init (&segment, GST_FORMAT_TIME); + fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_segment (&segment))); + /* pushing gives away my reference ... */ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK); fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ())); @@ -603,15 +603,15 @@ GST_START_TEST (test_64_hp_0hz) in[i] = 1.0; gst_buffer_unmap (inbuffer, &map); - /* ensure segment (format) properly setup */ - gst_segment_init (&segment, GST_FORMAT_TIME); - fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_segment (&segment))); - caps = gst_caps_from_string (AUDIO_WSINC_LIMIT_CAPS_STRING_64); gst_pad_set_caps (mysrcpad, caps); gst_caps_unref (caps); ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1); + /* ensure segment (format) properly setup */ + gst_segment_init (&segment, GST_FORMAT_TIME); + fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_segment (&segment))); + /* pushing gives away my reference ... */ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK); fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ())); @@ -674,15 +674,15 @@ GST_START_TEST (test_64_hp_22050hz) } gst_buffer_unmap (inbuffer, &map); - /* ensure segment (format) properly setup */ - gst_segment_init (&segment, GST_FORMAT_TIME); - fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_segment (&segment))); - caps = gst_caps_from_string (AUDIO_WSINC_LIMIT_CAPS_STRING_64); gst_pad_set_caps (mysrcpad, caps); gst_caps_unref (caps); ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1); + /* ensure segment (format) properly setup */ + gst_segment_init (&segment, GST_FORMAT_TIME); + fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_segment (&segment))); + /* pushing gives away my reference ... */ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK); fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ())); @@ -742,15 +742,15 @@ GST_START_TEST (test_64_small_buffer) in[i] = 1.0; gst_buffer_unmap (inbuffer, &map); - /* ensure segment (format) properly setup */ - gst_segment_init (&segment, GST_FORMAT_TIME); - fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_segment (&segment))); - caps = gst_caps_from_string (AUDIO_WSINC_LIMIT_CAPS_STRING_64); gst_pad_set_caps (mysrcpad, caps); gst_caps_unref (caps); ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1); + /* ensure segment (format) properly setup */ + gst_segment_init (&segment, GST_FORMAT_TIME); + fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_segment (&segment))); + /* pushing gives away my reference ... */ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK); fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()));