summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg_decoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-01-05 21:25:34 +0000
committerCarl Hetherington <cth@carlh.net>2018-01-05 21:25:34 +0000
commit8b6f0da2060d29b8d71745cf3db5dfe1a3ef1a43 (patch)
tree3fa5e748de38131f8a2c4ef81fe8bb78db9d345e /src/lib/ffmpeg_decoder.cc
parentad59559fdd19f89852eebd94299691e6091ff02f (diff)
Missing stop emission for fully-timed FFmpeg subtitles; should fix #1101.
Diffstat (limited to 'src/lib/ffmpeg_decoder.cc')
-rw-r--r--src/lib/ffmpeg_decoder.cc6
1 files changed, 6 insertions, 0 deletions
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<ContentTime>();
}
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);
}