summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2010-03-09 22:35:53 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-03-09 22:35:53 +0200
commit9786d386679e814f814fc0eb2426086c1f3fd16e (patch)
treeb9d2be371df5e65859127b70fb3b95f26f7003af /mplayer.c
parent173beb5608d893c0d9b42c1043f1dfa2db2e4df2 (diff)
downloadmpv-9786d386679e814f814fc0eb2426086c1f3fd16e.tar.bz2
mpv-9786d386679e814f814fc0eb2426086c1f3fd16e.tar.xz
subs: support loading external ASS subtitles via stream layer
Previously the argument of the "-sub" option was always interpreted as a local filename when trying to read it as a libass file. Use the stream layer to read it instead, so that protocols like 'http://' are also supported like they are for the main video/audio file. Based on patch by Yuriy Kaminskiy <yumkam@mail.ru>
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mplayer.c b/mplayer.c
index cc8dc825e3..f99f426746 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -1117,9 +1117,9 @@ void add_subtitles(struct MPContext *mpctx, char *filename, float fps, int noerr
#ifdef CONFIG_ASS
if (opts->ass_enabled) {
#ifdef CONFIG_ICONV
- asst = ass_read_file(ass_library, filename, sub_cp);
+ asst = ass_read_stream(ass_library, filename, sub_cp);
#else
- asst = ass_read_file(ass_library, filename, 0);
+ asst = ass_read_stream(ass_library, filename, 0);
#endif
if (!asst) {
subd = sub_read_file(filename, fps);