diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-10-16 03:29:55 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-10-16 03:29:55 +0100 |
| commit | 068bb5b95652c022419c64f3d29cc42c4610ae93 (patch) | |
| tree | 373b5b9bd91a351ae9727e6d4f388eb7157fda7f /src/lib/decoder.cc | |
| parent | 13511ed2fcc23f4d5f9c507c775c3c5cfd82d155 (diff) | |
| parent | 27e1f73c75e6c0f75d4863cfe2c8e50f811913d9 (diff) | |
Merge branch 'master' of /home/carl/git/dvdomatic
Diffstat (limited to 'src/lib/decoder.cc')
| -rw-r--r-- | src/lib/decoder.cc | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/lib/decoder.cc b/src/lib/decoder.cc index 1f771da2d..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,15 +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) { - list<shared_ptr<SubtitleImage> > im = _subtitle->images (); - for (list<shared_ptr<SubtitleImage> >::iterator i = im.begin(); i != im.end(); ++i) { - Position const p = (*i)->position (); - (*i)->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)); } } |
