diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-05-13 00:41:50 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-05-13 00:41:50 +0100 |
| commit | 83e5567530d0be24490abdda46d196e4279c5030 (patch) | |
| tree | ae1b8f679fa448d7fc48b7a0521e52c256611cd6 /src/lib/ffmpeg_examiner.cc | |
| parent | 2bfd531137f1a4874493186015046e33c5a07c1e (diff) | |
Look up unknown subtitle end times from the data prepared by the examiner.
Diffstat (limited to 'src/lib/ffmpeg_examiner.cc')
| -rw-r--r-- | src/lib/ffmpeg_examiner.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/ffmpeg_examiner.cc b/src/lib/ffmpeg_examiner.cc index e4f4e6f29..8afd4c164 100644 --- a/src/lib/ffmpeg_examiner.cc +++ b/src/lib/ffmpeg_examiner.cc @@ -152,11 +152,11 @@ FFmpegExaminer::subtitle_packet (AVCodecContext* context, shared_ptr<FFmpegSubti if (avcodec_decode_subtitle2 (context, &sub, &frame_finished, &_packet) >= 0 && frame_finished) { FFmpegSubtitlePeriod const period = subtitle_period (sub); if (sub.num_rects <= 0 && _last_subtitle_start) { - stream->periods.push_back (ContentTimePeriod (_last_subtitle_start.get (), period.from)); + stream->add_subtitle (ContentTimePeriod (_last_subtitle_start.get (), period.from)); _last_subtitle_start = optional<ContentTime> (); } else if (sub.num_rects == 1) { if (period.to) { - stream->periods.push_back (ContentTimePeriod (period.from, period.to.get ())); + stream->add_subtitle (ContentTimePeriod (period.from, period.to.get ())); } else { _last_subtitle_start = period.from; } |
