wpe: Ignore 'error-cancelled' 'failures'
authorThibault Saunier <tsaunier@igalia.com>
Mon, 15 Mar 2021 19:25:36 +0000 (16:25 -0300)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 16 Mar 2021 13:06:22 +0000 (13:06 +0000)
This happens when the user use the 'load-bytes' signal and nothing is wrong there

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2085>

ext/wpe/WPEThreadedView.cpp

index 255fac6..ec30741 100644 (file)
@@ -195,6 +195,13 @@ WPEView* WPEContextThread::createWPEView(GstWpeSrc* src, GstGLContext* context,
 static gboolean s_loadFailed(WebKitWebView*, WebKitLoadEvent, gchar* failing_uri, GError* error, gpointer data)
 {
     GstWpeSrc* src = GST_WPE_SRC(data);
+
+    if (g_error_matches(error, WEBKIT_NETWORK_ERROR, WEBKIT_NETWORK_ERROR_CANCELLED)) {
+        GST_INFO_OBJECT (src, "Loading cancelled.");
+
+        return FALSE;
+    }
+
     GST_ELEMENT_ERROR (GST_ELEMENT_CAST(src), RESOURCE, FAILED, (NULL), ("Failed to load %s (%s)", failing_uri, error->message));
     return FALSE;
 }