diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-08-23 11:17:03 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-08-23 11:17:03 +0100 |
| commit | d6be9f27147113dc6355ed0de7c99d1312aaeebd (patch) | |
| tree | 5df043ccf1a56938f256976cc1f5ce7f2fea6057 /src/lib/player.cc | |
| parent | 57796599a3acc10feebcbc87da70daf4d0af04f6 (diff) | |
Tidy up duplicated code.
Diffstat (limited to 'src/lib/player.cc')
| -rw-r--r-- | src/lib/player.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc index bae00d348..84589ce39 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -255,7 +255,7 @@ Player::process_video (weak_ptr<Piece> weak_piece, shared_ptr<const Image> image libdcp::Size const image_size = content->ratio()->size (_video_container_size); - work_image = work_image->scale_and_convert_to_rgb (image_size, _film->scaler(), true); + work_image = work_image->scale (image_size, _film->scaler(), PIX_FMT_RGB24, true); Time time = content->position() + relative_time - content->trim_start (); @@ -640,7 +640,12 @@ Player::update_subtitle () _out_subtitle.position.x = rint (_video_container_size.width * (in_rect.x + (in_rect.width * (1 - sc->subtitle_scale ()) / 2))); _out_subtitle.position.y = rint (_video_container_size.height * (in_rect.y + (in_rect.height * (1 - sc->subtitle_scale ()) / 2))); - _out_subtitle.image = _in_subtitle.image->scale (libdcp::Size (scaled_size.width, scaled_size.height), Scaler::from_id ("bicubic"), true); + _out_subtitle.image = _in_subtitle.image->scale ( + scaled_size, + Scaler::from_id ("bicubic"), + _in_subtitle.image->pixel_format (), + true + ); _out_subtitle.from = _in_subtitle.from + piece->content->position (); _out_subtitle.to = _in_subtitle.to + piece->content->position (); } |
