cacasink: exit properly when invalid driver has been selected.

See .
This commit is contained in:
Priit Laes 2009-10-19 21:59:23 +03:00 committed by Tim-Philipp Müller
parent 683f2a02fb
commit 45042dffbc

View file

@ -350,7 +350,12 @@ static gboolean
gst_cacasink_open (GstCACASink * cacasink)
{
cacasink->bitmap = NULL;
caca_init ();
if (caca_init () < 0) {
GST_ELEMENT_ERROR (cacasink, RESOURCE, OPEN_WRITE, (NULL),
("caca_init() failed"));
return FALSE;
}
cacasink->screen_width = caca_get_width ();
cacasink->screen_height = caca_get_height ();