diff options
author | wm4 <wm4@nowhere> | 2014-01-08 21:46:42 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-01-08 21:46:42 +0100 |
commit | 1d2a11133737802baa555dcbff9482bd5c8120ad (patch) | |
tree | c8c512a911c936435d1201277033793dc48876ff /stream/stream.h | |
parent | 59c6fa220158794791b5e1674c4aa1e1a439c2c8 (diff) | |
download | mpv-1d2a11133737802baa555dcbff9482bd5c8120ad.tar.bz2 mpv-1d2a11133737802baa555dcbff9482bd5c8120ad.tar.xz |
player: strip 'file://' from filenames on playback start
This fixes two things:
1. Dropping files on the VO window will auto-load subtitles (since most
drag & drop code prefixes the filenames with 'file://', and the
subtitle auto-load code considers 'file://' non-local)
2. Fix behavior of the %x screenshot filename template (similar problem)
One could force all that code to special-case 'file://' URLs, but just
replacing the filename on playback start is simpler.
Diffstat (limited to 'stream/stream.h')
-rw-r--r-- | stream/stream.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/stream/stream.h b/stream/stream.h index 9cb227bfa8..e64baf07c6 100644 --- a/stream/stream.h +++ b/stream/stream.h @@ -281,4 +281,7 @@ typedef struct { void mp_url_unescape_inplace(char *buf); char *mp_url_escape(void *talloc_ctx, const char *s, const char *ok); +// stream_file.c +char *mp_file_url_to_filename(void *talloc_ctx, bstr url); + #endif /* MPLAYER_STREAM_H */ |