diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-10-15 23:42:19 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-10-15 23:42:19 +0100 |
| commit | 63b7da59cee71ab2ade744a8b547b5d8f2ff6bfc (patch) | |
| tree | 6e107ab63deff4e5e8b5a462f767e6ed4685cbdb /src/lib/decoder.cc | |
| parent | bd9906422fe59126a27a3002b2bb4ce497eef508 (diff) | |
Clean up subtitle classes a bit.
Diffstat (limited to 'src/lib/decoder.cc')
| -rw-r--r-- | src/lib/decoder.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/decoder.cc b/src/lib/decoder.cc index 8989a938b..ef2ef6fb9 100644 --- a/src/lib/decoder.cc +++ b/src/lib/decoder.cc @@ -305,8 +305,8 @@ Decoder::process_video (AVFrame* frame) } shared_ptr<Subtitle> sub; - if (_subtitle && _subtitle->displayed_at (double (last_video_frame()) / rint (_fs->frames_per_second))) { - sub = _subtitle; + if (_timed_subtitle && _timed_subtitle->displayed_at (double (last_video_frame()) / rint (_fs->frames_per_second))) { + sub = _timed_subtitle->subtitle (); } TIMING ("Decoder emits %1", _video_frame); @@ -412,12 +412,12 @@ Decoder::setup_video_filters () } void -Decoder::process_subtitle (shared_ptr<Subtitle> s) +Decoder::process_subtitle (shared_ptr<TimedSubtitle> s) { - _subtitle = s; + _timed_subtitle = s; if (_opt->apply_crop) { - Position const p = _subtitle->position (); - _subtitle->set_position (Position (p.x - _fs->crop.left, p.y - _fs->crop.top)); + Position const p = _timed_subtitle->subtitle()->position (); + _timed_subtitle->subtitle()->set_position (Position (p.x - _fs->crop.left, p.y - _fs->crop.top)); } } |
