diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-05-22 16:53:38 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-05-22 16:53:38 +0100 |
| commit | 24d54ea7fe1ba128cf8d3521d6738fc73a7c623e (patch) | |
| tree | 7c3674e34b30f81334dc8f35a91d3cbb31b7ff9d /src/lib/ffmpeg_decoder.cc | |
| parent | d156fe45ee21fc416ce6b9e43ceed95bf42fde41 (diff) | |
Basics of noting subtitle times in FFmpegSubtitleStreams.
Diffstat (limited to 'src/lib/ffmpeg_decoder.cc')
| -rw-r--r-- | src/lib/ffmpeg_decoder.cc | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc index 7d152e490..d668deb6f 100644 --- a/src/lib/ffmpeg_decoder.cc +++ b/src/lib/ffmpeg_decoder.cc @@ -62,6 +62,7 @@ using dcp::Size; FFmpegDecoder::FFmpegDecoder (shared_ptr<const FFmpegContent> c, shared_ptr<Log> log) : VideoDecoder (c) , AudioDecoder (c) + , SubtitleDecoder (c) , FFmpeg (c) , _log (log) , _subtitle_codec_context (0) @@ -516,12 +517,7 @@ FFmpegDecoder::decode_subtitle_packet () /* Subtitle PTS (within the source, not taking into account any of the source that we may have chopped off for the DCP) */ - ContentTime packet_time = ContentTime::from_seconds (static_cast<double> (sub.pts) / AV_TIME_BASE) + _pts_offset; - - ContentTimePeriod period ( - packet_time + ContentTime::from_seconds (sub.start_display_time / 1e3), - packet_time + ContentTime::from_seconds (sub.end_display_time / 1e3) - ); + ContentTimePeriod period = subtitle_period (sub) + _pts_offset; AVSubtitleRect const * rect = sub.rects[0]; |
