[pitivi] previewers: Prevent the clip thumbnailer from choking on invalid URIs



commit ecda25c02f9042d3f7bf4ea1fcc633c033649ab6
Author: Jean-François Fortin Tam <nekohayo gmail com>
Date:   Mon May 27 23:20:22 2013 -0400

    previewers: Prevent the clip thumbnailer from choking on invalid URIs
    
    If for some reason (ex: a dodgy project file formatter) we get URIs with spaces
    in them, Gst.parse_launch will fail because it will see them as arguments.

 pitivi/timeline/previewers.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/pitivi/timeline/previewers.py b/pitivi/timeline/previewers.py
index d4f4b8b..e4c67b5 100644
--- a/pitivi/timeline/previewers.py
+++ b/pitivi/timeline/previewers.py
@@ -31,7 +31,7 @@ from gi.repository import Clutter, Gst, GLib, GdkPixbuf, Cogl
 from pitivi.utils.loggable import Loggable
 from pitivi.utils.timeline import Zoomable
 from pitivi.utils.ui import EXPANDED_SIZE, SPACING
-from pitivi.utils.misc import path_from_uri
+from pitivi.utils.misc import path_from_uri, quote_uri
 
 BORDER_WIDTH = 3  # For the timeline elements
 
@@ -57,7 +57,7 @@ class VideoPreviewer(Clutter.ScrollActor, Zoomable, Loggable):
         # Variables related to the timeline objects
         self.timeline = timeline
         self.bElement = bElement
-        self.uri = bElement.props.uri
+        self.uri = quote_uri(bElement.props.uri)  # Guard against malformed URIs
         self.duration = bElement.props.duration
 
         # Variables related to thumbnailing


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