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. --- sub/dec_sub.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'sub/dec_sub.c') diff --git a/sub/dec_sub.c b/sub/dec_sub.c index 0a62e52a15..79aaeba888 100644 --- a/sub/dec_sub.c +++ b/sub/dec_sub.c @@ -209,7 +209,6 @@ void sub_init_from_sh(struct dec_sub *sub, struct sh_stream *sh) sub_set_extradata(sub, sh->sub->extradata, sh->sub->extradata_len); struct sd init_sd = sub->init_sd; init_sd.codec = sh->codec; - init_sd.ass_track = sh->sub->track; init_sd.sub_stream_w = sh->sub->w; init_sd.sub_stream_h = sh->sub->h; @@ -416,8 +415,7 @@ bool sub_read_all_packets(struct dec_sub *sub, struct sh_stream *sh) pthread_mutex_lock(&sub->lock); - if (!sub_accept_packets_in_advance(sub) || sh->sub->track || sub->num_sd < 1) - { + if (!sub_accept_packets_in_advance(sub) || sub->num_sd < 1) { pthread_mutex_unlock(&sub->lock); return false; } -- cgit v1.2.3