X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Ffilm_viewer.cc;fp=src%2Fwx%2Ffilm_viewer.cc;h=c56e2f5d26f89a3478e3e2385ddd99ee5dd82dd2;hb=7e39519864cf40256a31fb6d42818c1a02fa2d63;hp=b5b2ca972e57aa345856cea8ce28037db1788283;hpb=c103d8c1306e5fb3937b3a6c430a3fff32653fa3;p=dcpomatic.git diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc index b5b2ca972..c56e2f5d2 100644 --- a/src/wx/film_viewer.cc +++ b/src/wx/film_viewer.cc @@ -303,6 +303,16 @@ FilmViewer::calculate_sizes () out_size.width = max (64, out_size.width); out_size.height = max (64, out_size.height); + /* Make sure the video container sizes are always a multiple of 2 so that + * we don't get gaps with subsampled sources (e.g. YUV420) + */ + if (out_size.width % 2) { + out_size.width++; + } + if (out_size.height % 2) { + out_size.height++; + } + _player->set_video_container_size (out_size); }