X-Git-Url: https://git.ao2.it/experiments/gstreamer.git/blobdiff_plain/ecc8e3d12270bae9cd7583c4e505a7c8974e8eb3..3208aec357132a0005909f245f6694295c4c9428:/gst-trick-mode-looping-2.py diff --git a/gst-trick-mode-looping-2.py b/gst-trick-mode-looping-2.py index 156ef08..920677d 100755 --- a/gst-trick-mode-looping-2.py +++ b/gst-trick-mode-looping-2.py @@ -33,8 +33,8 @@ class Player: sys.stderr.write(".") player.set_property("uri", self._filename) - # XXX Ater the first iteration of the loop the playback rate is reset to - # normal. Do I need to re-set the rate here? + # XXX Ater the first iteration of the loop the playback rate is + # reset to normal. Do I need to re-set the rate here? # If I uncomment the following line, the player hangs: #self.set_rate(self._date) @@ -54,7 +54,7 @@ class Player: print 'on_state_changed' old_state, new_state, pending = msg.parse_state_changed() print "%s -> %s" % (old_state, new_state) - if new_state == gst.STATE_PAUSED: + if old_state == gst.STATE_READY and new_state == gst.STATE_PAUSED: self.set_rate(self._rate) def set_rate(self, rate):