From 5a89150a4652d987f24d7d386d5cdc6d9109e66d Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 17 Nov 2015 01:54:02 +0100 Subject: player: remove OSD subtitle render path This was used with --no-sub-ass (aka --no-ass). This option (which is not yet removed) strips all styling from the subtitles, and renders them as plaintext only. For some reason, it originally seemed convenient to reuse all the OSD text rendering code (osd_libass.c). While this was indeed simple, it had a bad influence on the rest of the code. For example, it had to decide whether to go through the OSD code path, or the proper subtitle renderer in sd_ass.c. Kill the OSD subtitle renderer. Reimplement --no-sub-ass and also "secondary" subtitles in sd_ass.c. fill_plaintext() contains some rather minor code duplication with osd_libass.c for setting up a dummy ASS_Event and escaping the stripped text. Since sd_ass.c already has to handle "normal" text subtitles, and has code for stripping ASS tags, this remains all relatively simple. Remove all the unnecessary crap from the rest of the code. --- sub/osd_state.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sub/osd_state.h') diff --git a/sub/osd_state.h b/sub/osd_state.h index 6fa03abe77..c3d4a6f295 100644 --- a/sub/osd_state.h +++ b/sub/osd_state.h @@ -20,7 +20,7 @@ struct osd_object { struct osd_progbar_state progbar_state; // OSDTYPE_SUB/OSDTYPE_SUB2 - struct osd_sub_state sub_state; + struct dec_sub *sub; // OSDTYPE_EXTERNAL int external_res_x, external_res_y; -- cgit v1.2.3