diff options
Diffstat (limited to 'src/lib/ffmpeg_content.cc')
| -rw-r--r-- | src/lib/ffmpeg_content.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/lib/ffmpeg_content.cc b/src/lib/ffmpeg_content.cc index a191959fc..2b507ab37 100644 --- a/src/lib/ffmpeg_content.cc +++ b/src/lib/ffmpeg_content.cc @@ -392,3 +392,18 @@ FFmpegContent::audio_analysis_path () const p /= name; return p; } + +bool +FFmpegContent::has_subtitle_during (ContentTimePeriod period) const +{ + shared_ptr<FFmpegSubtitleStream> stream = subtitle_stream (); + + /* XXX: inefficient */ + for (vector<ContentTimePeriod>::const_iterator i = stream->periods.begin(); i != stream->periods.end(); ++i) { + if (i->from <= period.to && i->to >= period.from) { + return true; + } + } + + return false; +} |
