[pitivi] previewers: query_success can be true and duration == -1.
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] previewers: query_success can be true and duration == -1.
- Date: Fri, 27 Sep 2013 20:07:38 +0000 (UTC)
commit ca59e8454943d7a16a29f2dde428ebce3f5cf3bc
Author: Mathieu Duponchelle <mathieu duponchelle epitech eu>
Date: Thu Sep 26 03:41:18 2013 +0200
previewers: query_success can be true and duration == -1.
In that case use track element duration.
pitivi/timeline/previewers.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/timeline/previewers.py b/pitivi/timeline/previewers.py
index 8be06df..ddcbcef 100644
--- a/pitivi/timeline/previewers.py
+++ b/pitivi/timeline/previewers.py
@@ -272,7 +272,7 @@ class VideoPreviewer(Clutter.ScrollActor, PreviewGenerator, Zoomable, Loggable):
self.debug('Now generating thumbnails for "%s"' % filename_from_uri(self.uri))
self.queue = []
query_success, duration = self.pipeline.query_duration(Gst.Format.TIME)
- if not query_success:
+ if not query_success or duration == -1:
self.debug("Could not determine duration of %s" % self.uri)
duration = self.duration
else:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]