[pitivi] timeline: Fix assertion in the wavefor generation code
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] timeline: Fix assertion in the wavefor generation code
- Date: Thu, 21 Jul 2016 14:42:58 +0000 (UTC)
commit b9675bd1147ac7be7cd7f96c38171352f824f5bc
Author: Thibault Saunier <tsaunier gnome org>
Date: Thu Jul 21 10:04:41 2016 -0400
timeline: Fix assertion in the wavefor generation code
We should not query position on a pipeline that is in READY state
Fixes T7510
Reviewed-by: Alex Băluț <alexandru balut gmail com>
Differential Revision: https://phabricator.freedesktop.org/D1193
pitivi/timeline/previewers.py | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/pitivi/timeline/previewers.py b/pitivi/timeline/previewers.py
index 881cab2..1fe8ea9 100644
--- a/pitivi/timeline/previewers.py
+++ b/pitivi/timeline/previewers.py
@@ -893,11 +893,12 @@ class PipelineCpuAdapter(Loggable):
if usage_percent >= WAVEFORMS_CPU_USAGE:
if self.rate < 0.1:
if not self.ready:
- self.ready = True
- self.pipeline.set_state(Gst.State.READY)
- res, self.lastPos = self.pipeline.query_position(
+ res, position = self.pipeline.query_position(
Gst.Format.TIME)
- assert res
+ if res:
+ self.lastPos = position
+ self.pipeline.set_state(Gst.State.READY)
+ self.ready = True
return True
if self.rate > 0.0:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]