Skip to content

Commit

Permalink
qml: do not use percent encoded url for avdevice wang-bin#755
Browse files Browse the repository at this point in the history
  • Loading branch information
wang-bin committed Oct 26, 2016
1 parent e3dcb67 commit 32edc94
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions qml/QmlAVPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 136,12 @@ void QmlAVPlayer::setSource(const QUrl &url)
if (mSource == url)
return;
mSource = url;
if (url.isLocalFile() || url.scheme().isEmpty() || url.scheme().startsWith("qrc"))
mpPlayer->setFile(QUrl::fromPercentEncoding(mSource.toEncoded()));
if (url.isLocalFile() || url.scheme().isEmpty()
|| url.scheme().startsWith("qrc")
|| url.scheme().startsWith("avdevice")
// TODO: what about custom io?
)
mpPlayer->setFile(QUrl::fromPercentEncoding(url.toEncoded()));
else
mpPlayer->setFile(url.toEncoded());
Q_EMIT sourceChanged(); //TODO: Q_EMIT only when player loaded a new source
Expand Down

0 comments on commit 32edc94

Please sign in to comment.