From: Carl Hetherington Date: Fri, 5 Jan 2018 21:25:34 +0000 (+0000) Subject: Missing stop emission for fully-timed FFmpeg subtitles; should fix #1101. X-Git-Tag: v2.11.37~7 X-Git-Url: https://git.carlh.net/gitweb/?a=commitdiff_plain;h=8b6f0da2060d29b8d71745cf3db5dfe1a3ef1a43;hp=ad59559fdd19f89852eebd94299691e6091ff02f;p=dcpomatic.git Missing stop emission for fully-timed FFmpeg subtitles; should fix #1101. --- diff --git a/ChangeLog b/ChangeLog index 05d29803a..0d7177c65 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2018-01-05 Carl Hetherington + * Fix hanging subtitles in some cases (#1101). + * Version 2.11.36 released. 2018-01-04 Carl Hetherington 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); }