[pitivi: 1/9] Catch PipelineError exceptions calling pipeline.se



commit 4699dc8c3436966c6322fa6062b523e1e28c5d7e
Author: Alessandro Decina <alessandro decina collabora co uk>
Date:   Tue Mar 3 16:09:21 2009 +0100

    Catch PipelineError exceptions calling pipeline.seek from the viewer.
---
 pitivi/ui/viewer.py |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/pitivi/ui/viewer.py b/pitivi/ui/viewer.py
index ec509dc..18f7d72 100644
--- a/pitivi/ui/viewer.py
+++ b/pitivi/ui/viewer.py
@@ -28,6 +28,7 @@ from pitivi.action import ViewAction
 
 from pitivi.utils import time_to_string, Seeker
 from pitivi.log.loggable import Loggable
+from pitivi.pipeline import PipelineError
 
 class ViewerError(Exception):
     pass
@@ -326,8 +327,10 @@ class PitiviViewer(gtk.VBox, Loggable):
         self.seeker.seek(position, format)
 
     def _seekerSeekCb(self, seeker, position, format):
-        self.pipeline.seek(position, format)
-        self._newTime(position)
+        try:
+            self.pipeline.seek(position, format)
+        except PipelineError:
+            self.error("seek failed %s %s", gst.TIME_ARGS(position), format)
 
     def _newTime(self, value, frame=-1):
         self.info("value:%s, frame:%d", gst.TIME_ARGS(value), frame)



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