[pitivi] pipeline: Avoid committing when the state is NULL



commit 15bb21c026f1d1b9c5d99d178ad643b62c33051a
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Mon Apr 10 07:05:27 2017 +0200

    pipeline: Avoid committing when the state is NULL
    
    Fixes T7741
    
    Reviewed-by: Thibault Saunier <tsaunier gnome org>
    Differential Revision: https://phabricator.freedesktop.org/D1720

 pitivi/utils/pipeline.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/utils/pipeline.py b/pitivi/utils/pipeline.py
index ec5163d..b41f26a 100644
--- a/pitivi/utils/pipeline.py
+++ b/pitivi/utils/pipeline.py
@@ -626,11 +626,15 @@ class Pipeline(GES.Pipeline, SimplePipeline):
             SimplePipeline._busMessageCb(self, bus, message)
 
     def commit_timeline(self):
+        if self.getState() == Gst.State.NULL:
+            # No need to commit. NLE will do it automatically when
+            # changing state from READY to PAUSED.
+            return
         is_empty = self.props.timeline.is_empty()
         if self._busy_async and not self._was_empty and not is_empty:
             self._commit_wanted = True
             self._was_empty = False
-            self.debug("commit wanted")
+            self.log("commit wanted")
         else:
             self._addWaitingForAsyncDoneTimeout()
             self.props.timeline.commit()


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