From 2603c3c5d94ce5e300337d71eeabb56ff3f55fc4 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 23 Oct 2016 23:27:49 +0100 Subject: Merge identical time periods returned from text_subtitles_during to stop multiple copies of subtitles being returned from the decoder. --- src/lib/dcpomatic_time.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/lib/dcpomatic_time.h') diff --git a/src/lib/dcpomatic_time.h b/src/lib/dcpomatic_time.h index da903cf09..893bce257 100644 --- a/src/lib/dcpomatic_time.h +++ b/src/lib/dcpomatic_time.h @@ -272,6 +272,13 @@ public: return (from <= other && other < to); } + bool operator< (TimePeriod const & o) const { + if (from != o.from) { + return from < o.from; + } + return to < o.to; + } + bool operator== (TimePeriod const & other) const { return from == other.from && to == other.to; } -- cgit v1.2.3