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
This commit is contained in:
Stefan Kost 2006-12-22 12:10:18 +00:00
parent 3da0606ffc
commit bd988b3417
3 changed files with 25 additions and 2 deletions

View file

@ -1,3 +1,12 @@
2006-12-22 Stefan Kost <ensonic@users.sf.net>
* 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 <thaytan@mad.scientist.com>
* gst/ffmpegcolorspace/avcodec.h:

View file

@ -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;
}

View file

@ -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;
}