Prevent warning when importing GstPbutils.

Warning was:

PyGIWarning: GstPbutils was imported without specifying a version first. Use gi.require_version('GstPbutils', '1.0') before import to ensure that the right version gets loaded.
This commit is contained in:
Ben Sturmfels 2019-11-01 16:41:45 +11:00
parent e34916ee8b
commit 48208c278c
No known key found for this signature in database
GPG Key ID: 023C05E2C9C068F0

View File

@ -36,6 +36,7 @@ gi.require_version('Gst', '1.0')
from gi.repository import GLib, Gst
Gst.init(None)
# init before import to work around https://bugzilla.gnome.org/show_bug.cgi?id=736260
gi.require_version('GstPbutils', '1.0')
from gi.repository import GstPbutils
sys.argv = old_argv