From 94618a724124cbf5fe9f0b47a3fdce601fcd5581 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 1 Apr 2024 01:04:41 +0200 Subject: Fix hanging/overlapping dvb subtitles (#2792). This reverts a change made in 8ca6fd6d97e6d42492afddb655fa85130946853c "Fix doubled subtitles if subtitle stop times are specified." That change breaks the case where a subtitle _does_ have a stop time, but it's wrong (30s from the start time) and we want the next subtitle to clear the previous one. I can't now see how reverting this could cause doubled subtitles, so maybe that problem wlil come back. At least now there's a test for #2792. --- src/lib/ffmpeg_decoder.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib/ffmpeg_decoder.cc') diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc index 7f7a07863..6130d8e5f 100644 --- a/src/lib/ffmpeg_decoder.cc +++ b/src/lib/ffmpeg_decoder.cc @@ -668,11 +668,11 @@ FFmpegDecoder::decode_and_process_subtitle_packet (AVPacket* packet) */ ContentTime from; from = sub_period.from + _pts_offset; + _have_current_subtitle = true; if (sub_period.to) { _current_subtitle_to = *sub_period.to + _pts_offset; } else { _current_subtitle_to = optional(); - _have_current_subtitle = true; } ContentBitmapText bitmap_text(from); -- cgit v1.2.3