summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg_examiner.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-11-23 09:54:16 +0000
committerCarl Hetherington <cth@carlh.net>2016-11-23 09:54:16 +0000
commitcd32ade6c276b9163a8aa889a9d81ead6ddb59d6 (patch)
tree63af1edfaa43524129909e3eeaeec2aa2e1dec9d /src/lib/ffmpeg_examiner.cc
parent827e9dac612368b0268f973ac59520b33c4f880f (diff)
Fix hanging subtitles after recent changes to subtitle examination.
Diffstat (limited to 'src/lib/ffmpeg_examiner.cc')
-rw-r--r--src/lib/ffmpeg_examiner.cc17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/lib/ffmpeg_examiner.cc b/src/lib/ffmpeg_examiner.cc
index 271180d5d..eb02ba17b 100644
--- a/src/lib/ffmpeg_examiner.cc
+++ b/src/lib/ffmpeg_examiner.cc
@@ -160,21 +160,10 @@ FFmpegExaminer::FFmpegExaminer (shared_ptr<const FFmpegContent> c, shared_ptr<Jo
/* Finish off any hanging subtitles at the end */
for (LastSubtitleMap::const_iterator i = _last_subtitle_start.begin(); i != _last_subtitle_start.end(); ++i) {
if (i->second) {
- if (i->second->image) {
- i->first->add_image_subtitle (
+ if (i->first->unknown_to (i->second->id)) {
+ i->first->set_subtitle_to (
i->second->id,
- ContentTimePeriod (
- i->second->time,
- ContentTime::from_frames (video_length(), video_frame_rate().get_value_or (24))
- )
- );
- } else {
- i->first->add_text_subtitle (
- i->second->id,
- ContentTimePeriod (
- i->second->time,
- ContentTime::from_frames (video_length(), video_frame_rate().get_value_or (24))
- )
+ ContentTime::from_frames (video_length(), video_frame_rate().get_value_or (24))
);
}
}