projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
56287eb
)
Sort return from subtitles_during to fix all-subtitles display in SubtitlePanel.
author
Carl Hetherington
<cth@carlh.net>
Thu, 26 May 2016 15:56:41 +0000
(16:56 +0100)
committer
Carl Hetherington
<cth@carlh.net>
Thu, 26 May 2016 15:56:41 +0000
(16:56 +0100)
src/lib/ffmpeg_subtitle_stream.cc
patch
|
blob
|
history
diff --git
a/src/lib/ffmpeg_subtitle_stream.cc
b/src/lib/ffmpeg_subtitle_stream.cc
index 6028d10a9bd8c7db6efc30e52291fdea329ee0e3..d1992f138530d4de25feedde8539af71c1d3d093 100644
(file)
--- a/
src/lib/ffmpeg_subtitle_stream.cc
+++ b/
src/lib/ffmpeg_subtitle_stream.cc
@@
-143,6
+143,13
@@
FFmpegSubtitleStream::text_subtitles_during (ContentTimePeriod period, bool star
return subtitles_during (period, starting, _text_subtitles);
}
+struct PeriodSorter
+{
+ bool operator() (ContentTimePeriod const & a, ContentTimePeriod const & b) {
+ return a.from < b.from;
+ }
+};
+
list<ContentTimePeriod>
FFmpegSubtitleStream::subtitles_during (ContentTimePeriod period, bool starting, PeriodMap const & subs) const
{
@@
-155,6
+162,8
@@
FFmpegSubtitleStream::subtitles_during (ContentTimePeriod period, bool starting,
}
}
+ d.sort (PeriodSorter ());
+
return d;
}