diff options
Diffstat (limited to 'sub')
-rw-r--r-- | sub/ass_mp.c | 28 | ||||
-rw-r--r-- | sub/ass_mp.h | 2 |
2 files changed, 0 insertions, 30 deletions
diff --git a/sub/ass_mp.c b/sub/ass_mp.c index 48a713f6ee..5e87223041 100644 --- a/sub/ass_mp.c +++ b/sub/ass_mp.c @@ -112,34 +112,6 @@ ASS_Track *mp_ass_default_track(ASS_Library *library, struct MPOpts *opts) return track; } -ASS_Track *mp_ass_read_stream(ASS_Library *library, const char *fname, - char *charset) -{ - ASS_Track *track; - - struct stream *s = open_stream(fname, NULL, NULL); - if (!s) - // Stream code should have printed an error already - return NULL; - struct bstr content = stream_read_complete(s, NULL, 100000000); - if (content.start == NULL) - mp_tmsg(MSGT_ASS, MSGL_ERR, "Refusing to load subtitle file " - "larger than 100 MB: %s\n", fname); - free_stream(s); - if (content.len == 0) { - talloc_free(content.start); - return NULL; - } - content.start[content.len] = 0; - track = ass_read_memory(library, content.start, content.len, charset); - if (track) { - free(track->name); - track->name = strdup(fname); - } - talloc_free(content.start); - return track; -} - void mp_ass_configure(ASS_Renderer *priv, struct MPOpts *opts, struct mp_osd_res *dim) { diff --git a/sub/ass_mp.h b/sub/ass_mp.h index dbdc95f031..c0fba934eb 100644 --- a/sub/ass_mp.h +++ b/sub/ass_mp.h @@ -49,8 +49,6 @@ void mp_ass_set_style(ASS_Style *style, int res_y, struct osd_style_opts *opts); void mp_ass_add_default_styles(ASS_Track *track, struct MPOpts *opts); ASS_Track *mp_ass_default_track(ASS_Library *library, struct MPOpts *opts); -ASS_Track *mp_ass_read_stream(ASS_Library *library, const char *fname, - char *charset); struct MPOpts; void mp_ass_configure(ASS_Renderer *priv, struct MPOpts *opts, |