[pitivi] viewer: Don't try to seek the tmp pipeline before being in PAUSED.



commit 41f2527d7e378df7ab4107026f90fe0a69b359b1
Author: Mathieu Duponchelle <mathieu duponchelle epitech eu>
Date:   Thu Jun 27 00:07:53 2013 +0200

    viewer: Don't try to seek the tmp pipeline before being in PAUSED.

 pitivi/viewer.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/viewer.py b/pitivi/viewer.py
index 0456d73..a34c826 100644
--- a/pitivi/viewer.py
+++ b/pitivi/viewer.py
@@ -451,7 +451,7 @@ class PitiviViewer(Gtk.VBox, Loggable):
             self._tmp_pipeline.set_property("uri", clip_uri)
             self.setPipeline(SimplePipeline(self._tmp_pipeline, self._tmp_pipeline))
             self._lastClipTrimTime = cur_time
-        if (cur_time - self._lastClipTrimTime) > 0.2:
+        if (cur_time - self._lastClipTrimTime) > 0.2 and self.pipeline.getState() == Gst.State.PAUSED:
             # Do not seek more than once every 200 ms (for performance)
             self._tmp_pipeline.seek_simple(Gst.Format.TIME, Gst.SeekFlags.FLUSH, position)
             self._lastClipTrimTime = cur_time


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]