[pitivi] previewers: Use the requested timestamp when caching the thumbnail



commit 7eb73267af4e70c30b0843cdeb65b04fdc086c73
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Mon Dec 9 09:21:37 2013 +0100

    previewers: Use the requested timestamp when caching the thumbnail

 pitivi/timeline/previewers.py |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/pitivi/timeline/previewers.py b/pitivi/timeline/previewers.py
index b84b7a5..5a5dc20 100644
--- a/pitivi/timeline/previewers.py
+++ b/pitivi/timeline/previewers.py
@@ -389,11 +389,6 @@ class VideoPreviewer(Clutter.ScrollActor, PreviewGenerator, Zoomable, Loggable):
         # => Daniel: It is *not* nanosecond precise when we remove the videorate
         #            element from the pipeline
         # => thiblahute: not the case with mpegts
-        if time in self.queue:
-            self.queue.remove(time)
-
-        self.thumb_cache[time] = pixbuf
-
         if time in self.thumbs:
             thumb = self.thumbs[time]
         else:
@@ -410,6 +405,9 @@ class VideoPreviewer(Clutter.ScrollActor, PreviewGenerator, Zoomable, Loggable):
                                "for timestamp %s" % print_ns(time))
                     return
         thumb.set_from_gdkpixbuf_animated(pixbuf)
+        if time in self.queue:
+            self.queue.remove(time)
+        self.thumb_cache[time] = pixbuf
 
     # Interface (Zoomable)
 


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