From 8b6f0da2060d29b8d71745cf3db5dfe1a3ef1a43 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 5 Jan 2018 21:25:34 +0000 Subject: Missing stop emission for fully-timed FFmpeg subtitles; should fix #1101. --- src/lib/ffmpeg_decoder.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/lib/ffmpeg_decoder.cc') diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc index 0d6ac383f..26b1d4bf8 100644 --- a/src/lib/ffmpeg_decoder.cc +++ b/src/lib/ffmpeg_decoder.cc @@ -563,6 +563,8 @@ FFmpegDecoder::decode_subtitle_packet () _have_current_subtitle = true; if (sub_period.to) { _current_subtitle_to = *sub_period.to + _pts_offset; + } else { + _current_subtitle_to = optional(); } for (unsigned int i = 0; i < sub.num_rects; ++i) { @@ -583,6 +585,10 @@ FFmpegDecoder::decode_subtitle_packet () } } + if (_current_subtitle_to) { + subtitle->emit_stop (*_current_subtitle_to); + } + avsubtitle_free (&sub); } -- cgit v1.2.3