summaryrefslogtreecommitdiff
path: root/ext/wpe/WPEThreadedView.cpp
diff options
context:
space:
mode:
authorThibault Saunier <tsaunier@igalia.com>2021-03-15 16:25:36 -0300
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2021-03-16 13:06:22 +0000
commit8a0224a19841264f2c59dc78d92be9e2bcec074d (patch)
tree236433c5d5ae266dfcbfab692887ca675c334ea4 /ext/wpe/WPEThreadedView.cpp
parent3f08fcb4ff244c974494ba9a1966a2fbd43c3188 (diff)
downloadgstreamer-plugins-bad-8a0224a19841264f2c59dc78d92be9e2bcec074d.tar.gz
wpe: Ignore 'error-cancelled' 'failures'
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>
Diffstat (limited to 'ext/wpe/WPEThreadedView.cpp')
-rw-r--r--ext/wpe/WPEThreadedView.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/wpe/WPEThreadedView.cpp b/ext/wpe/WPEThreadedView.cpp
index 255fac636..ec30741fe 100644
--- a/ext/wpe/WPEThreadedView.cpp
+++ b/ext/wpe/WPEThreadedView.cpp
@@ -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;
}