Check _inter_size in ::has_j2k() (fixes #2086).
authorCarl Hetherington <cth@carlh.net>
Sun, 19 Sep 2021 20:58:31 +0000 (22:58 +0200)
committerCarl Hetherington <cth@carlh.net>
Sun, 19 Sep 2021 20:58:31 +0000 (22:58 +0200)
The example in the bug shrinks a content DCP while keeping the
container the same.  We need to check that neither _out_size nor
_inter_size have changed, to check for scaling/padding.

src/lib/player_video.cc

index d3a2868293e8adac8ba74cfe058f8b9b7fb223ee..b0e75972ce342338c2ce152ddb6f0e0a313db17a 100644 (file)
@@ -230,7 +230,7 @@ PlayerVideo::has_j2k () const
                return false;
        }
 
-       return _crop == Crop() && _out_size == j2k->size() && !_text && !_fade && !_colour_conversion;
+       return _crop == Crop() && _out_size == j2k->size() && _inter_size == j2k->size() && !_text && !_fade && !_colour_conversion;
 }
 
 shared_ptr<const dcp::Data>