From 4c81edf91283e756d5d03c0a86d01abbcba9492f Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Tue, 24 May 2011 15:16:39 +0000 Subject: [PATCH] * morituri/common/task.py: Show us when we stop twice. * morituri/common/gstreamer.py: Stop on Exceptions. --- ChangeLog | 7 +++++++ morituri/common/gstreamer.py | 1 + morituri/common/task.py | 3 +++ 3 files changed, 11 insertions(+) diff --git a/ChangeLog b/ChangeLog index 7e02960..d0579d8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2011-05-24 Thomas Vander Stichele + + * morituri/common/task.py: + Show us when we stop twice. + * morituri/common/gstreamer.py: + Stop on Exceptions. + 2011-05-24 Thomas Vander Stichele * morituri/common/common.py: diff --git a/morituri/common/gstreamer.py b/morituri/common/gstreamer.py index 34d9d64..2051c04 100644 --- a/morituri/common/gstreamer.py +++ b/morituri/common/gstreamer.py @@ -97,6 +97,7 @@ class GstPipelineTask(task.Task): def playLater(): if self.exception: self.debug('playLater: exception was raised, not playing') + self.stop() return False self.debug('setting pipeline to PLAYING') diff --git a/morituri/common/task.py b/morituri/common/task.py index 658eb34..e5f099d 100644 --- a/morituri/common/task.py +++ b/morituri/common/task.py @@ -98,6 +98,9 @@ class Task(object, log.Loggable): """ self.debug('stopping') self.running = False + if not self.runner: + print 'ERROR: stopping task which is already stopped' + import traceback; traceback.print_stack() self.runner = None self._notifyListeners('stopped')