[pitivi] previewers: Reuse local variable



commit fe90d2c10c6bad5878dce432e06fd05a1fce6581
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Sun Dec 8 23:39:07 2013 +0100

    previewers: Reuse local variable

 pitivi/timeline/previewers.py |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/pitivi/timeline/previewers.py b/pitivi/timeline/previewers.py
index 1d07e4b..a6ac85e 100644
--- a/pitivi/timeline/previewers.py
+++ b/pitivi/timeline/previewers.py
@@ -407,7 +407,7 @@ class VideoPreviewer(Clutter.ScrollActor, PreviewGenerator, Zoomable, Loggable):
                     self.error("Surrounding thumbnails are already set "
                                "for timestamp %s" % print_ns(time))
                     return
-            self.thumbs[time].set_from_gdkpixbuf_animated(pixbuf)
+            thumb.set_from_gdkpixbuf_animated(pixbuf)
 
     # Interface (Zoomable)
 
@@ -478,7 +478,9 @@ class VideoPreviewer(Clutter.ScrollActor, PreviewGenerator, Zoomable, Loggable):
             struct = message.get_structure()
             struct_name = struct.get_name()
             if struct_name == "preroll-pixbuf":
-                self._setThumbnail(struct.get_value("stream-time"), struct.get_value("pixbuf"))
+                stream_time = struct.get_value("stream-time")
+                pixbuf = struct.get_value("pixbuf")
+                self._setThumbnail(stream_time, pixbuf)
         elif message.type == Gst.MessageType.ASYNC_DONE and \
                 message.src == self.pipeline:
             self._checkCPU()


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