mediafile: Load extension at startup with GTK_MEDIA

When the GTK_MEDIA env var is set, check at startup that it works, not
only when the first MediaFile is instantiated.

This has the fortunate side effect that it prints help output for
GTK_MEDIA=help at startup, too.
This commit is contained in:
Benjamin Otte
2020-12-26 14:55:41 +01:00
parent 9d79982677
commit cf48f83709

View File

@@ -643,4 +643,8 @@ gtk_media_file_extension_init (void)
g_type_name (g_io_extension_get_type (ext)));
}
}
/* If the env var is given, check at startup that things actually work */
if (g_getenv ("GTK_MEDIA"))
gtk_media_file_get_extension ();
}