From 63b7da59cee71ab2ade744a8b547b5d8f2ff6bfc Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 15 Oct 2012 23:42:19 +0100 Subject: Clean up subtitle classes a bit. --- src/lib/decoder.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/lib/decoder.cc') 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 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 s) +Decoder::process_subtitle (shared_ptr 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)); } } -- cgit v1.2.3