Fix black borders around the preview in some cases (#2331).
authorCarl Hetherington <cth@carlh.net>
Wed, 14 Sep 2022 23:03:51 +0000 (01:03 +0200)
committerCarl Hetherington <cth@carlh.net>
Fri, 16 Sep 2022 20:38:05 +0000 (22:38 +0200)
commit7e39519864cf40256a31fb6d42818c1a02fa2d63
tree94c432345fd98fc3df803f664f993915bd8c1a52
parentc103d8c1306e5fb3937b3a6c430a3fff32653fa3
Fix black borders around the preview in some cases (#2331).

We need to round the container size to the nearest multiple of 2
so that cropping subsampled sources does not leave gaps.  As far
as I can see:

- the direction that you round x in doesn't matter
- it's better to round y up

(if you calculate the error in the resulting ratio in each case).
src/lib/video_content.cc
src/wx/film_viewer.cc