From 4be0225870ffcf290cf5109f96a01977dba2c6e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Tue, 12 Jan 2010 23:53:18 +0000 Subject: [PATCH] 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. --- ext/libmms/gstmms.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ext/libmms/gstmms.c b/ext/libmms/gstmms.c index 97e34646ff..20abafb478 100644 --- a/ext/libmms/gstmms.c +++ b/ext/libmms/gstmms.c @@ -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; }