summaryrefslogtreecommitdiff
path: root/gst-libs/gst/uridownloader
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2014-02-27 11:53:12 +0100
committerSebastian Dröge <sebastian@centricular.com>2014-02-27 11:53:51 +0100
commit3fd5b74f73226a99bb0ebb3ad40d029048b74b88 (patch)
tree3c7a3759b81ab418f60d9599a6b199fec24c4b8e /gst-libs/gst/uridownloader
parent40e7bfd35de2263c8ee0cbe34a0e8f8a5fe1cec1 (diff)
uridownloader: Warning messages are not fatal
Also they need to be parsed with gst_message_parse_warning(), gst_message_parse_error() does not work on them.
Diffstat (limited to 'gst-libs/gst/uridownloader')
-rw-r--r--gst-libs/gst/uridownloader/gsturidownloader.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/gst-libs/gst/uridownloader/gsturidownloader.c b/gst-libs/gst/uridownloader/gsturidownloader.c
index 8b81e5a06..a0d8169e6 100644
--- a/gst-libs/gst/uridownloader/gsturidownloader.c
+++ b/gst-libs/gst/uridownloader/gsturidownloader.c
@@ -191,8 +191,7 @@ gst_uri_downloader_bus_handler (GstBus * bus,
{
GstUriDownloader *downloader = (GstUriDownloader *) (data);
- if (GST_MESSAGE_TYPE (message) == GST_MESSAGE_ERROR ||
- GST_MESSAGE_TYPE (message) == GST_MESSAGE_WARNING) {
+ if (GST_MESSAGE_TYPE (message) == GST_MESSAGE_ERROR) {
GError *err = NULL;
gchar *dbg_info = NULL;
@@ -222,6 +221,17 @@ gst_uri_downloader_bus_handler (GstBus * bus,
g_cond_signal (&downloader->priv->cond);
}
GST_OBJECT_UNLOCK (downloader);
+ } else if (GST_MESSAGE_TYPE (message) == GST_MESSAGE_WARNING) {
+ GError *err = NULL;
+ gchar *dbg_info = NULL;
+
+ gst_message_parse_warning (message, &err, &dbg_info);
+ GST_WARNING_OBJECT (downloader,
+ "Received error: %s from %s, the download will be cancelled",
+ GST_OBJECT_NAME (message->src), err->message);
+ GST_DEBUG ("Debugging info: %s\n", (dbg_info) ? dbg_info : "none");
+ g_error_free (err);
+ g_free (dbg_info);
}
gst_message_unref (message);