summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2022-06-08 00:47:03 +0200
committerBastien Nocera <hadess@hadess.net>2022-07-18 10:14:53 +0200
commit99e6ebd9d929b6105d351bd647bc7e3c429fb352 (patch)
tree07520ed5b0e82575dff278697611e322c431d262
parent0061ec01460dfb582a65b83198263d33555fc08b (diff)
downloadtotem-99e6ebd9d929b6105d351bd647bc7e3c429fb352.tar.gz
backend: Throw a better error if OpenGL couldn't init
Throw a better error than "The specified file could not be found" when GTK fails to initialise OpenGL support. This can happen when the version of OpenGL supported by the drivers is too old to work with GTK, for example: MESA_GL_VERSION_OVERRIDE=2.7 totem Closes: #523
-rw-r--r--src/backend/bacon-video-widget.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/backend/bacon-video-widget.c b/src/backend/bacon-video-widget.c
index f3ebfff5d..b11d9bee4 100644
--- a/src/backend/bacon-video-widget.c
+++ b/src/backend/bacon-video-widget.c
@@ -3344,6 +3344,14 @@ bvw_error_from_gst_error (BaconVideoWidget *bvw, GstMessage * err_msg)
* BVW_ERROR_BROKEN_FILE
*/
+ if (src_typename &&
+ g_str_equal (src_typename, "GstGtkGLSink") &&
+ is_error (e, RESOURCE, NOT_FOUND)) {
+ ret = g_error_new_literal (BVW_ERROR, BVW_ERROR_GENERIC,
+ _("Could not initialise OpenGL support"));
+ goto done;
+ }
+
/* Can't open optical disc? */
if (is_error (e, RESOURCE, NOT_FOUND) ||
is_error (e, RESOURCE, OPEN_READ)) {