[Xfce4-commits] <parole:master> Force cdda:// instead of cdda:/ in case given in the command line as gstreamer doesnt't like cdda:/.

Ali Abdallah noreply at xfce.org
Wed Nov 25 10:40:06 CET 2009


Updating branch refs/heads/master
         to 1909e7e27f05df4caaee27de5b6f97adcbbe9388 (commit)
       from 1ec3bcf4108f0f009ab03d88aef3565bed4aed10 (commit)

commit 1909e7e27f05df4caaee27de5b6f97adcbbe9388
Author: Ali Abdallah <ali at ali-xfce.org>
Date:   Wed Nov 25 10:31:12 2009 +0100

    Force cdda:// instead of cdda:/ in case given in the command line
    as gstreamer doesnt't like cdda:/.

 gst/parole-gst.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/gst/parole-gst.c b/gst/parole-gst.c
index bdd8c06..f9c65e3 100644
--- a/gst/parole-gst.c
+++ b/gst/parole-gst.c
@@ -1875,6 +1875,8 @@ void parole_gst_play_uri (ParoleGst *gst, const gchar *uri, const gchar *subtitl
 
 void parole_gst_play_device_uri (ParoleGst *gst, const gchar *uri, const gchar *device)
 {
+    const gchar *local_uri = NULL;
+    
     TRACE ("device : %s", device);
     
     if ( gst->priv->device )
@@ -1885,7 +1887,15 @@ void parole_gst_play_device_uri (ParoleGst *gst, const gchar *uri, const gchar *
     
     gst->priv->device = g_strdup (device);
     
-    parole_gst_play_uri (gst, uri, NULL);
+    /*
+     * Don't play cdda:/ as gstreamer gives an error
+     * but cdda:// works.
+     */
+    if ( G_UNLIKELY (!g_strcmp0 (uri, "cdda:/") ) )
+	local_uri = "cdda://";
+    else
+	local_uri = uri;
+    parole_gst_play_uri (gst, local_uri, NULL);
 }
 
 void parole_gst_pause (ParoleGst *gst)



More information about the Xfce4-commits mailing list