[pitivi] pipeline: Don't recover when already released



commit 61e814bf971a71c45e14c92e9a5d3aa8caf0a5d4
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Mon Jun 27 15:12:44 2016 +0200

    pipeline: Don't recover when already released
    
    When clicking the media library Import button and the first selected
    file is a video file, an AssetPipeline is started to preview it. If the
    dialog is closed right away with ESC, after a few seconds
    _asyncDoneNotReceivedCb is called. This one calls _recover() which puts
    the pipeline in the PAUSE state which causes the preview video to show
    in a new window.
    
    Fixed by deactivating the _asyncDoneNotReceived handle.
    
    Added a check to make sure no recovering is performed after the pipeline
    has been released.
    
    Differential Revision: https://phabricator.freedesktop.org/D1133

 pitivi/utils/pipeline.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/pitivi/utils/pipeline.py b/pitivi/utils/pipeline.py
index 5eeac9f..1731765 100644
--- a/pitivi/utils/pipeline.py
+++ b/pitivi/utils/pipeline.py
@@ -126,6 +126,7 @@ class SimplePipeline(GObject.Object, Loggable):
 
         The instance will no longer be usable.
         """
+        self._removeWaitingForAsyncDoneTimeout()
         self.deactivatePositionListener()
         self._bus.disconnect_by_func(self._busMessageCb)
         self._bus.remove_signal_watch()
@@ -446,6 +447,8 @@ class SimplePipeline(GObject.Object, Loggable):
         self.__waiting_for_async_done = value
 
     def _recover(self):
+        if not self._bus:
+            raise PipelineError("Should not try to recover after destroy")
         if self._attempted_recoveries > MAX_RECOVERIES:
             self.emit("died")
             self.error(


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