[vlc-devel] commit: Fix encoding for open URLs (Jean-Baptiste Kempf )
git version control
git at videolan.org
Fri Feb 19 00:27:59 CET 2010
vlc/phonon | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Fri Feb 19 00:27:51 2010 +0100| [2f37b7bc6af03645abc4cdd6c7ed85476cef13a2] | committer: Jean-Baptiste Kempf
Fix encoding for open URLs
Patch from "Marcos Dione" on IRC
> http://git.videolan.org/gitweb.cgi/vlc/phonon.git/?a=commit;h=2f37b7bc6af03645abc4cdd6c7ed85476cef13a2
---
vlc/mediaobject.cpp | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/vlc/mediaobject.cpp b/vlc/mediaobject.cpp
index a8a845b..214ff07 100644
--- a/vlc/mediaobject.cpp
+++ b/vlc/mediaobject.cpp
@@ -207,11 +207,18 @@ void MediaObject::setSource(const MediaSource & source)
case MediaSource::Invalid:
break;
case MediaSource::LocalFile:
- loadMedia(mediaSource.fileName());
- break;
case MediaSource::Url:
- loadMedia(mediaSource.url().toString());
+ {
+ qCritical() << __FUNCTION__ << "yeap, 'tis a local file or url" << source.url().scheme();
+ const QByteArray &mrl = (source.url().scheme() == QLatin1String("") ?
+ "file://" + source.url().toEncoded() :
+ source.url().toEncoded());
+ loadMedia(mrl);
+ }
break;
+/* case MediaSource::Url:
+ loadMedia(mediaSource.url().toEncoded());
+ break;*/
case MediaSource::Disc:
switch (source.discType()) {
case Phonon::NoDisc:
More information about the vlc-devel
mailing list