mmssrc: post error message in addition to redirect when connect fails

When we can't connect to the server, we should still post a proper
error message on the bus, so that applications that don't handle the
redirect messsage get a proper error message (and a hint to look for
the redirect).

Fixes #606636.
This commit is contained in:
Tim-Philipp Müller 2010-01-12 23:53:18 +00:00
parent ba06eddb40
commit 4be0225870

View file

@ -452,6 +452,14 @@ gst_mms_start (GstBaseSrc * bsrc)
gst_message_new_element (GST_OBJECT_CAST (mms),
gst_structure_new ("redirect", "new-location", G_TYPE_STRING, url,
NULL)));
/* post an error message as well, so that applications that don't handle
* redirect messages get to see a proper error message */
GST_ELEMENT_ERROR (mms, RESOURCE, OPEN_READ,
("Could not connect to streaming server."),
("A redirect message was posted on the bus and should have been "
"handled by the application."));
return FALSE;
}