[totem/gnome-3-6] backend: Fix playing files from recent:///



commit 0725b5a541f08c65a4a8bfcf5a96ccca97756192
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Dec 17 17:18:22 2012 +0100

    backend: Fix playing files from recent:///
    
    Loads of confusion as to the playback path for trash:/// and
    recent:/// would cause an assertion when drag'n'dropping such a file.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=690304

 src/backend/bacon-video-widget.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/backend/bacon-video-widget.c b/src/backend/bacon-video-widget.c
index 376eef8..bed827b 100644
--- a/src/backend/bacon-video-widget.c
+++ b/src/backend/bacon-video-widget.c
@@ -3506,19 +3506,20 @@ bacon_video_widget_open (BaconVideoWidget * bvw,
     path = NULL;
   } else if (g_file_has_uri_scheme (file, "trash") != FALSE ||
            g_file_has_uri_scheme (file, "recent") != FALSE) {
-    path = get_target_uri (file);
-    if (path == NULL)
+    path = NULL;
+    bvw->priv->mrl = get_target_uri (file);
+    if (bvw->priv->mrl == NULL)
       path = g_file_get_path (file);
     else
       GST_DEBUG ("Found target location '%s' for original MRL '%s'",
-		 GST_STR_NULL (path), mrl);
+		 GST_STR_NULL (bvw->priv->mrl), mrl);
   } else {
     path = g_file_get_path (file);
   }
   if (path) {
     bvw->priv->mrl = g_filename_to_uri (path, NULL, NULL);
     g_free (path);
-  } else {
+  } else if (bvw->priv->mrl == NULL) {
     bvw->priv->mrl = g_strdup (mrl);
   }
 



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