From bd988b3417c002e4fd01b5ce430df14089f3ae89 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Fri, 22 Dec 2006 12:10:18 +0000 Subject: [PATCH] tests/check/elements/: Fix the dp tests, but activating the pads for the streamheader tests too and cleaning up condi... Original commit message from CVS: * tests/check/elements/gdpdepay.c: (cleanup_gdpdepay), (setup_gdpdepay_streamheader): * tests/check/elements/gdppay.c: (cleanup_gdppay), (setup_gdppay_streamheader): Fix the dp tests, but activating the pads for the streamheader tests too and cleaning up conditionaly --- ChangeLog | 9 +++++++++ tests/check/elements/gdpdepay.c | 9 ++++++++- tests/check/elements/gdppay.c | 9 ++++++++- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 17e1684b2e..b19be93b16 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2006-12-22 Stefan Kost + + * tests/check/elements/gdpdepay.c: (cleanup_gdpdepay), + (setup_gdpdepay_streamheader): + * tests/check/elements/gdppay.c: (cleanup_gdppay), + (setup_gdppay_streamheader): + Fix the dp tests, but activating the pads for the streamheader tests + too and cleaning up conditionaly + 2006-12-22 Jan Schmidt * gst/ffmpegcolorspace/avcodec.h: diff --git a/tests/check/elements/gdpdepay.c b/tests/check/elements/gdpdepay.c index 5857c2e4ff..119f1cdff8 100644 --- a/tests/check/elements/gdpdepay.c +++ b/tests/check/elements/gdpdepay.c @@ -84,10 +84,15 @@ cleanup_gdpdepay (GstElement * gdpdepay) GST_DEBUG ("cleanup_gdpdepay"); gst_pad_set_active (mysrcpad, FALSE); - gst_pad_set_active (mysinkpad, FALSE); + if (mysinkpad) + gst_pad_set_active (mysinkpad, FALSE); + if (myshsinkpad) + gst_pad_set_active (myshsinkpad, FALSE); gst_check_teardown_src_pad (gdpdepay); gst_check_teardown_sink_pad (gdpdepay); gst_check_teardown_element (gdpdepay); + mysinkpad = NULL; + myshsinkpad = NULL; } static void @@ -270,6 +275,8 @@ setup_gdpdepay_streamheader () gdpdepay = gst_check_setup_element ("gdpdepay"); mysrcpad = gst_check_setup_src_pad (gdpdepay, &srctemplate, NULL); myshsinkpad = gst_check_setup_sink_pad (gdpdepay, &shsinktemplate, NULL); + gst_pad_set_active (mysrcpad, TRUE); + gst_pad_set_active (myshsinkpad, TRUE); return gdpdepay; } diff --git a/tests/check/elements/gdppay.c b/tests/check/elements/gdppay.c index a554d31f27..80f386fe82 100644 --- a/tests/check/elements/gdppay.c +++ b/tests/check/elements/gdppay.c @@ -82,11 +82,16 @@ cleanup_gdppay (GstElement * gdppay) { GST_DEBUG ("cleanup_gdppay"); - gst_pad_set_active (mysrcpad, FALSE); + if (mysrcpad) + gst_pad_set_active (mysrcpad, FALSE); + if (myshsrcpad) + gst_pad_set_active (myshsrcpad, FALSE); gst_pad_set_active (mysinkpad, FALSE); gst_check_teardown_src_pad (gdppay); gst_check_teardown_sink_pad (gdppay); gst_check_teardown_element (gdppay); + mysrcpad = NULL; + myshsrcpad = NULL; } GST_START_TEST (test_audio) @@ -220,6 +225,8 @@ setup_gdppay_streamheader () gdppay = gst_check_setup_element ("gdppay"); myshsrcpad = gst_check_setup_src_pad (gdppay, &shsrctemplate, NULL); mysinkpad = gst_check_setup_sink_pad (gdppay, &sinktemplate, NULL); + gst_pad_set_active (myshsrcpad, TRUE); + gst_pad_set_active (mysinkpad, TRUE); return gdppay; }