mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 04:36:20 +00:00
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:
parent
ba06eddb40
commit
4be0225870
1 changed files with 8 additions and 0 deletions
|
@ -452,6 +452,14 @@ gst_mms_start (GstBaseSrc * bsrc)
|
||||||
gst_message_new_element (GST_OBJECT_CAST (mms),
|
gst_message_new_element (GST_OBJECT_CAST (mms),
|
||||||
gst_structure_new ("redirect", "new-location", G_TYPE_STRING, url,
|
gst_structure_new ("redirect", "new-location", G_TYPE_STRING, url,
|
||||||
NULL)));
|
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;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue