prevent GStreamer ValueError crash if Gst namespace is not available.
@@ -46,9 +46,12 @@ from ..exceptions import MediaDecodeException
from .base import StreamingSource, AudioData, AudioFormat, StaticSource
from . import MediaEncoder, MediaDecoder
+try:
import gi
gi.require_version('Gst', '1.0')
from gi.repository import Gst, GLib
+except (ValueError, ImportError) as e:
+ raise ImportError(e)
class GStreamerDecodeException(MediaDecodeException):
