diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-02-01 00:26:37 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-02-01 00:26:37 +0000 |
| commit | 22873931f874a87fcf6a0077eddbec0f97eb3423 (patch) | |
| tree | cabf1595fd8814e62730e8d846ca4288682d5cdd /src/lib/ffmpeg_examiner.h | |
| parent | 030c74f085718ea276c6e55a7a7c7de267a9ebf3 (diff) | |
Subtitle "to" times used to be stored against their "from" times.
Sadly an example shows that from times are not unique. This patch
uses a hash of stuff from the first AVSubtitle as the key.
Diffstat (limited to 'src/lib/ffmpeg_examiner.h')
| -rw-r--r-- | src/lib/ffmpeg_examiner.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/lib/ffmpeg_examiner.h b/src/lib/ffmpeg_examiner.h index 6e2185129..e87e11d1c 100644 --- a/src/lib/ffmpeg_examiner.h +++ b/src/lib/ffmpeg_examiner.h @@ -86,6 +86,17 @@ private: Frame _video_length; bool _need_video_length; - typedef std::map<boost::shared_ptr<FFmpegSubtitleStream>, boost::optional<ContentTime> > LastSubtitleMap; + struct SubtitleStart + { + SubtitleStart (std::string id_, ContentTime time_) + : id (id_) + , time (time_) + {} + + std::string id; + ContentTime time; + }; + + typedef std::map<boost::shared_ptr<FFmpegSubtitleStream>, boost::optional<SubtitleStart> > LastSubtitleMap; LastSubtitleMap _last_subtitle_start; }; |
