summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-10-20 21:33:27 +0200
committerwm4 <wm4@nowhere>2013-11-02 19:00:53 +0100
commitefc32ac0dfb0e44f1bb7ba180aa690e9fe60a0b8 (patch)
tree272acfd6e4941a6101519193ae4cc462e0be679d
parent042302fa6561906a340a6f5f8362d0198bfd9402 (diff)
downloadmpv-efc32ac0dfb0e44f1bb7ba180aa690e9fe60a0b8.tar.bz2
mpv-efc32ac0dfb0e44f1bb7ba180aa690e9fe60a0b8.tar.xz
mplayer: don't call libquvi for local files
This is obviously not needed, and just creates potential for bad breakages (e.g. what happens if libquvi tries to open a normal filename as http URL?). Note that for simplicity, we still pass file:// URIs to quvi, and we don't exclude other protocol prefixes either. In general, we don't know what protocols quvi might support, so we don't try to second-guess it. (Even though in practice, it's probably only "http" and "https".)
-rw-r--r--mpvcore/mplayer.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mpvcore/mplayer.c b/mpvcore/mplayer.c
index c0504caf5f..ae692413f0 100644
--- a/mpvcore/mplayer.c
+++ b/mpvcore/mplayer.c
@@ -4251,6 +4251,8 @@ static void add_subtitle_fonts_from_sources(struct MPContext *mpctx)
static struct mp_resolve_result *resolve_url(const char *filename,
struct MPOpts *opts)
{
+ if (!mp_is_url(bstr0(filename)))
+ return NULL;
#if defined(CONFIG_LIBQUVI) || defined(CONFIG_LIBQUVI9)
return mp_resolve_quvi(filename, opts);
#else