tests/check/elements/alsa.c: Unref the mixer if the state change fails too (if the alsa devices are inaccessible, for...

Original commit message from CVS:
* tests/check/elements/alsa.c: (GST_START_TEST):
Unref the mixer if the state change fails too (if the
alsa devices are inaccessible, for example)
This commit is contained in:
Jan Schmidt 2007-03-08 18:26:07 +00:00
parent 9c26f99cce
commit 9d1fc287e0
2 changed files with 9 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2007-03-08 Jan Schmidt <thaytan@mad.scientist.com>
* tests/check/elements/alsa.c: (GST_START_TEST):
Unref the mixer if the state change fails too (if the
alsa devices are inaccessible, for example)
2007-03-08 Jan Schmidt <thaytan@mad.scientist.com>
* tests/check/Makefile.am:

View file

@ -81,8 +81,10 @@ GST_START_TEST (test_alsa_mixer_track)
fail_unless (mixer != NULL, "Failed to create 'alsamixer' element!");
state_ret = gst_element_set_state (mixer, GST_STATE_READY);
if (state_ret != GST_STATE_CHANGE_SUCCESS)
if (state_ret != GST_STATE_CHANGE_SUCCESS) {
gst_object_unref (mixer);
return;
}
GST_LOG ("opened alsamixer");
fail_unless (GST_IS_MIXER (mixer), "is not a GstMixer?!");