diff --git a/oxgst/info.py b/oxgst/info.py index 877d6f9..7b6dcb8 100644 --- a/oxgst/info.py +++ b/oxgst/info.py @@ -41,7 +41,6 @@ class Info: self.bus.add_signal_watch() self.watch_id = self.bus.connect("message", self.onBusMessage) - self.pipeline.set_state(gst.STATE_PAUSED) self.pipeline.get_state() @@ -57,8 +56,9 @@ class Info: if pad.get_peer() and pad.get_peer().query(q): format, self.duration = q.parse_duration() self.metadata["duration"] = self.duration/gst.MSECOND - + self.mainloop.run() + if 'video-codec' in self.tags: self.metadata['video-codec'] = codec_list.get(self.tags['video-codec'], self.tags['video-codec']) if 'audio-codec' in self.tags: @@ -122,6 +122,8 @@ class Info: if message.type == gst.MESSAGE_TAG: for key in message.parse_tag().keys(): self.tags[key] = message.structure[key] + if message.type == gst.MESSAGE_ERROR: + self.quit() if message.src == self.pipeline and message.type == gst.MESSAGE_EOS: self.quit()