diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-12-18 21:13:53 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-12-18 21:13:53 +0000 |
| commit | 602fd58eff38fdfccc489b9f77b3ff0ca0009566 (patch) | |
| tree | f44645730c3b412fcc0c79f4bca73260567a362d /src/lib/video_decoder.cc | |
| parent | 039a55081427b1ff0026cd6b9ca787526d37ef92 (diff) | |
| parent | 0330d9b2924767d9240c5a25e9ed4327eb0a73bd (diff) | |
Fix merge.
Diffstat (limited to 'src/lib/video_decoder.cc')
| -rw-r--r-- | src/lib/video_decoder.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/lib/video_decoder.cc b/src/lib/video_decoder.cc index 4c05d5fcd..e723610b3 100644 --- a/src/lib/video_decoder.cc +++ b/src/lib/video_decoder.cc @@ -31,25 +31,26 @@ using boost::optional; VideoDecoder::VideoDecoder (shared_ptr<Film> f, shared_ptr<const DecodeOptions> o, Job* j) : Decoder (f, o, j) , _video_frame (0) - , _last_source_frame (0) + , _last_source_time (0) { } /** Called by subclasses to tell the world that some video data is ready. * We find a subtitle then emit it for listeners. - * @param frame to emit. + * @param image frame to emit. + * @param t Time of the frame within the source, in seconds. */ void -VideoDecoder::emit_video (shared_ptr<Image> image, SourceFrame f) +VideoDecoder::emit_video (shared_ptr<Image> image, double t) { shared_ptr<Subtitle> sub; - if (_timed_subtitle && _timed_subtitle->displayed_at (f / _film->frames_per_second())) { + if (_timed_subtitle && _timed_subtitle->displayed_at (t)) { sub = _timed_subtitle->subtitle (); } signal_video (image, sub); - _last_source_frame = f; + _last_source_time = t; } void |
