[pitivi] Seeker: Properly handle exceptions when seeking
- From: Edward Hervey <edwardrv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] Seeker: Properly handle exceptions when seeking
- Date: Sat, 10 Jul 2010 12:06:33 +0000 (UTC)
commit b16f039e3a21d57e85a7b9b9515d34e4ec01c6d6
Author: Edward Hervey <bilboed bilboed com>
Date: Sat Jul 10 14:00:55 2010 +0200
Seeker: Properly handle exceptions when seeking
If ever an exception was raised when doing a seek, we would end up
in a unknown state (making all following seeks fail).
Also add a error message for the failing seek
pitivi/utils.py | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/utils.py b/pitivi/utils.py
index 93c6448..1cb0c38 100644
--- a/pitivi/utils.py
+++ b/pitivi/utils.py
@@ -311,7 +311,14 @@ class Seeker(Signallable):
if self.position != None and self.format != None:
position, self.position = self.position, None
format, self.format = self.format, None
- self.emit('seek', position, format)
+ try:
+ self.emit('seek', position, format)
+ except:
+ log.doLog(log.ERROR, None, "seeker", "Error while seeking to position:%s format:%r",
+ (gst.TIME_ARGS(position), format))
+ # if an exception happened while seeking, properly
+ # reset ourselves
+ return False
return False
def get_filesystem_encoding():
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]