From 86689f7bf23dd05b5e6b9e42e43379d52e27c338 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 15 Mar 2014 22:17:51 +0100 Subject: demux_libass: change how external ASS subtitles are loaded Instead of parsing the ASS file in demux_libass.c and trying to pass the ASS_Track to the subtitle renderer, just read all file data in demux_libass.c, and let the subtitle renderer pass the file contents to ass_process_codec_private(). (This happens to parse full files too.) Makes the code simpler, though it also relies harder on the (messy) probe logic in demux_libass.c. --- player/loadfile.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'player/loadfile.c') diff --git a/player/loadfile.c b/player/loadfile.c index 05f4646d0a..bdea43b352 100644 --- a/player/loadfile.c +++ b/player/loadfile.c @@ -439,9 +439,6 @@ static struct track *add_stream_track(struct MPContext *mpctx, }; MP_TARRAY_APPEND(mpctx, mpctx->tracks, mpctx->num_tracks, track); - if (stream->type == STREAM_SUB) - track->preloaded = !!stream->sub->track; - // Needed for DVD and Blu-ray. struct stream *st = track->demuxer->stream; if (!track->lang && (st->uncached_type == STREAMTYPE_BLURAY || @@ -789,7 +786,6 @@ static struct track *open_external_file(struct MPContext *mpctx, char *filename, opts->stream_cache_min_percent, opts->stream_cache_seek_min_percent); struct demuxer_params params = { - .ass_library = mpctx->ass_library, // demux_libass requires it .expect_subtitle = filter == STREAM_SUB, }; struct demuxer *demuxer = -- cgit v1.2.3