summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg_decoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-06-08 13:53:30 +0100
committerCarl Hetherington <cth@carlh.net>2018-06-08 13:53:30 +0100
commit8ca6fd6d97e6d42492afddb655fa85130946853c (patch)
tree78567e5549b1bc40621ae7edce097f47d8bd4d4f /src/lib/ffmpeg_decoder.cc
parent9f8c40c1cd07c2e6ea0bea9a76a09056aa8635fd (diff)
Fix doubled subtitles if subtitle stop times are specified.
Diffstat (limited to 'src/lib/ffmpeg_decoder.cc')
-rw-r--r--src/lib/ffmpeg_decoder.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc
index 55ff01046..6a8f4d413 100644
--- a/src/lib/ffmpeg_decoder.cc
+++ b/src/lib/ffmpeg_decoder.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2012-2016 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2018 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
@@ -567,11 +567,11 @@ FFmpegDecoder::decode_subtitle_packet ()
FFmpegSubtitlePeriod sub_period = subtitle_period (sub);
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<ContentTime>();
+ _have_current_subtitle = true;
}
for (unsigned int i = 0; i < sub.num_rects; ++i) {