aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFraxinas <andreas.frisch@multimedia-labs.de>2010-03-15 11:17:48 +0100
committerFraxinas <andreas.frisch@multimedia-labs.de>2010-03-15 12:26:24 +0100
commitbc40d49c3f56137b65986cca012e6792ad1fdc33 (patch)
treeb3784ccad64b75b9ceb739ebefd143fa1f2b9451
parent9f8056cd2f459c5221e4af6e37b75bc671f14e8d (diff)
downloadenigma2-bc40d49c3f56137b65986cca012e6792ad1fdc33.tar.gz
enigma2-bc40d49c3f56137b65986cca012e6792ad1fdc33.zip
use glib function to escape file uri in mediaplayer
-rw-r--r--lib/service/servicemp3.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/service/servicemp3.cpp b/lib/service/servicemp3.cpp
index ccc5fbaf..0b2ac9d4 100644
--- a/lib/service/servicemp3.cpp
+++ b/lib/service/servicemp3.cpp
@@ -303,11 +303,11 @@ eServiceMP3::eServiceMP3(eServiceReference ref)
if ( ret == -1 ) // this is a "REAL" VCD
uri = g_strdup_printf ("vcd://");
else
- uri = g_strdup_printf ("file://%s", filename);
+ uri = g_filename_to_uri(filename, NULL, NULL);
}
else
- uri = g_strdup_printf ("file://%s", filename);
+ uri = g_filename_to_uri(filename, NULL, NULL);
eDebug("eServiceMP3::playbin2 uri=%s", uri);
@@ -341,9 +341,8 @@ eServiceMP3::eServiceMP3(eServiceReference ref)
struct stat buffer;
if (stat(srt_filename, &buffer) == 0)
{
- std::string suburi = "file://" + (std::string)srt_filename;
- eDebug("eServiceMP3::subtitle uri: %s",suburi.c_str());
- g_object_set (G_OBJECT (m_gst_playbin), "suburi", suburi.c_str(), NULL);
+ eDebug("eServiceMP3::subtitle uri: %s", g_filename_to_uri(srt_filename, NULL, NULL));
+ g_object_set (G_OBJECT (m_gst_playbin), "suburi", g_filename_to_uri(srt_filename, NULL, NULL), NULL);
subtitleStream subs;
subs.type = stSRT;
subs.language_code = std::string("und");