summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg_content.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-05-13 00:41:50 +0100
committerCarl Hetherington <cth@carlh.net>2015-05-13 00:41:50 +0100
commit83e5567530d0be24490abdda46d196e4279c5030 (patch)
treeae1b8f679fa448d7fc48b7a0521e52c256611cd6 /src/lib/ffmpeg_content.cc
parent2bfd531137f1a4874493186015046e33c5a07c1e (diff)
Look up unknown subtitle end times from the data prepared by the examiner.
Diffstat (limited to 'src/lib/ffmpeg_content.cc')
-rw-r--r--src/lib/ffmpeg_content.cc15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/lib/ffmpeg_content.cc b/src/lib/ffmpeg_content.cc
index 3a42b169f..ad9096b92 100644
--- a/src/lib/ffmpeg_content.cc
+++ b/src/lib/ffmpeg_content.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2013-2014 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -377,21 +377,12 @@ FFmpegContent::audio_analysis_path () const
list<ContentTimePeriod>
FFmpegContent::subtitles_during (ContentTimePeriod period, bool starting) const
{
- list<ContentTimePeriod> d;
-
shared_ptr<FFmpegSubtitleStream> stream = subtitle_stream ();
if (!stream) {
- return d;
- }
-
- /* XXX: inefficient */
- for (vector<ContentTimePeriod>::const_iterator i = stream->periods.begin(); i != stream->periods.end(); ++i) {
- if ((starting && period.contains (i->from)) || (!starting && period.overlaps (*i))) {
- d.push_back (*i);
- }
+ return list<ContentTimePeriod> ();
}
- return d;
+ return stream->subtitles_during (period, starting);
}
bool