diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-08-23 15:33:45 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-08-23 15:33:45 +0100 |
| commit | 97890961be41534b5aae058017d7d65a44d7d0fb (patch) | |
| tree | ad4e6623d699b6da52df4844279907cd86186c09 /src/lib/player.cc | |
| parent | d6be9f27147113dc6355ed0de7c99d1312aaeebd (diff) | |
Try to fix problems with odd crop values and YUV.
Diffstat (limited to 'src/lib/player.cc')
| -rw-r--r-- | src/lib/player.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc index 84589ce39..8a37cb835 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -250,8 +250,11 @@ Player::process_video (weak_ptr<Piece> weak_piece, shared_ptr<const Image> image if (content->trimmed (relative_time)) { return; } - - shared_ptr<Image> work_image = image->crop (content->crop(), true); + + /* Convert to RGB first, as FFmpeg doesn't seem to like handling YUV images with odd widths */ + shared_ptr<Image> work_image = image->scale (image->size (), _film->scaler(), PIX_FMT_RGB24, true); + + shared_ptr<Image> work_image = work_image->crop (content->crop(), true); libdcp::Size const image_size = content->ratio()->size (_video_container_size); |
