diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-11-20 22:08:11 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-11-20 22:08:11 +0000 |
| commit | 4337694dfd488e88f56b63898ad35ce8ce9bb3c3 (patch) | |
| tree | 8bba36173e1781eb18a81081e1ae27de4d4962ff /src/lib/ffmpeg_subtitle_stream.cc | |
| parent | 31724651675fc01a33ffa0818d4397858493dd56 (diff) | |
Fix subtitles (seen in DVB) which have a specified `to' time but
then are terminated earlier than that by a num_rects=0 subtitle.
Diffstat (limited to 'src/lib/ffmpeg_subtitle_stream.cc')
| -rw-r--r-- | src/lib/ffmpeg_subtitle_stream.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/lib/ffmpeg_subtitle_stream.cc b/src/lib/ffmpeg_subtitle_stream.cc index 627b0fef1..57c54e1ea 100644 --- a/src/lib/ffmpeg_subtitle_stream.cc +++ b/src/lib/ffmpeg_subtitle_stream.cc @@ -219,3 +219,19 @@ FFmpegSubtitleStream::has_image () const { return !_image_subtitles.empty (); } + +void +FFmpegSubtitleStream::set_subtitle_to (string id, ContentTime to) +{ + PeriodMap::iterator i = _image_subtitles.find (id); + if (i != _image_subtitles.end ()) { + i->second.to = to; + } else { + i = _text_subtitles.find (id); + if (i != _text_subtitles.end ()) { + i->second.to = to; + } else { + DCPOMATIC_ASSERT (false); + } + } +} |
