From 04af005c35ee11d227a758d7b4e9e6c9558c8409 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 17 Dec 2015 00:46:07 +0100 Subject: sd_ass: remove dead code With the FFmpeg subtitle decoder used for _all_ non-ASS text subtitle format, this code is simply unused now. Ironically, the FFmpeg subtitle decoder does not handle things correctly in a bunch of cases. Should it turn out they actually matter, they will have to hack back. The extend_event one is a candidate, although even though there were allegedly files which need it, I couldn't get samples from the user who originally reported such files. As such, extend_event was only confirmed to handle trailing events with no (endless) duration like with MicroDVD and LRC, but FFmpeg "fudges" these anyway, so no special handling is needed. This code also had logic to handle seeking with muxed srt subtitles, which made the sub-seek command work. But this has been broken before this commit already. Currently, seeking with muxed srt subs will clear all subtitles, as the broken FFmpeg ASS format output by the libavcodec subtitle converters does not check for duplicates. Since the subtitles are all cleared, ass_step_sub() can not work properly and sub-seek can not seek to already seen subtitles. --- sub/dec_sub.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'sub/dec_sub.c') diff --git a/sub/dec_sub.c b/sub/dec_sub.c index 68f3c159d2..451a5cab38 100644 --- a/sub/dec_sub.c +++ b/sub/dec_sub.c @@ -303,8 +303,6 @@ static void add_sub_list(struct dec_sub *sub, struct packet_list *subs) struct sd *sd = sub_get_last_sd(sub); assert(sd); - sd->no_remove_duplicates = true; - for (int n = 0; n < subs->num_packets; n++) decode_chain_recode(sub, subs->packets[n]); @@ -314,8 +312,6 @@ static void add_sub_list(struct dec_sub *sub, struct packet_list *subs) // but this is obviously unwanted in this case. if (sd->driver->fix_events) sd->driver->fix_events(sd); - - sd->no_remove_duplicates = false; } static void add_packet(struct packet_list *subs, struct demux_packet *pkt) -- cgit v1.2.3