projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix black borders around the preview in some cases (#2331).
[dcpomatic.git]
/
src
/
wx
/
film_viewer.cc
diff --git
a/src/wx/film_viewer.cc
b/src/wx/film_viewer.cc
index 0e6e908b3245c88fb8e9851e4e898a452c8d64bb..c56e2f5d26f89a3478e3e2385ddd99ee5dd82dd2 100644
(file)
--- a/
src/wx/film_viewer.cc
+++ b/
src/wx/film_viewer.cc
@@
-228,13
+228,10
@@
FilmViewer::recreate_butler ()
VideoRange::FULL,
j2k_gl_optimised ? Image::Alignment::COMPACT : Image::Alignment::PADDED,
true,
VideoRange::FULL,
j2k_gl_optimised ? Image::Alignment::COMPACT : Image::Alignment::PADDED,
true,
- j2k_gl_optimised
+ j2k_gl_optimised,
+ (Config::instance()->sound() && _audio.isStreamOpen()) ? Butler::Audio::ENABLED : Butler::Audio::DISABLED
);
);
- if (!Config::instance()->sound() && !_audio.isStreamOpen()) {
- _butler->disable_audio ();
- }
-
_closed_captions_dialog->set_butler (_butler);
resume ();
_closed_captions_dialog->set_butler (_butler);
resume ();
@@
-306,6
+303,16
@@
FilmViewer::calculate_sizes ()
out_size.width = max (64, out_size.width);
out_size.height = max (64, out_size.height);
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);
}
_player->set_video_container_size (out_size);
}
@@
-816,7
+823,7
@@
FilmViewer::set_crop_guess (dcpomatic::Rect<float> crop)
void
FilmViewer::unset_crop_guess ()
{
void
FilmViewer::unset_crop_guess ()
{
- _crop_guess =
{}
;
+ _crop_guess =
boost::none
;
_video_view->update ();
}
_video_view->update ();
}