diff options
author | wm4 <wm4@nowhere> | 2014-03-15 22:17:51 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-03-15 22:17:51 +0100 |
commit | 86689f7bf23dd05b5e6b9e42e43379d52e27c338 (patch) | |
tree | 05040ae3532ec9718e320b69a11d97264935f83b /sub/dec_sub.c | |
parent | f6b4f60264000ab16459639063cdfae64c3db942 (diff) |
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.
Diffstat (limited to 'sub/dec_sub.c')
-rw-r--r-- | sub/dec_sub.c | 4 |
1 files changed, 1 insertions, 3 deletions
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; } |