summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-07-26 15:22:54 +0200
committerCarl Hetherington <cth@carlh.net>2022-08-09 00:09:30 +0200
commitd881836379172f4072ed81ea074f46b3a363a681 (patch)
tree6af0e84b3d9de74d27e2ed5d0d1ab3e593106cb2 /src/lib
parent1346760b389b4f388fd9e2ae029cfb3d950734a6 (diff)
Fix lines down the right-hand-side of exports in some cases.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/image.cc16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/lib/image.cc b/src/lib/image.cc
index f86c105d4..629fc0a64 100644
--- a/src/lib/image.cc
+++ b/src/lib/image.cc
@@ -292,13 +292,15 @@ Image::crop_scale_window (
sws_freeContext (scale_context);
- if (corrected_crop != Crop() && cropped_size == inter_size) {
- /* We are cropping without any scaling or pixel format conversion, so FFmpeg may have left some
- data behind in our image. Clear it out. It may get to the point where we should just stop
- trying to be clever with cropping.
- */
- out->make_part_black (corner.x + cropped_size.width, out_size.width - cropped_size.width);
- }
+ /* There are some cases where there will be unwanted image data left in the image at this point:
+ *
+ * 1. When we are cropping without any scaling or pixel format conversion.
+ * 2. When we are scaling to certain sizes and placing the result into a larger
+ * black frame.
+ *
+ * Clear out the left hand side of the image to take care of that.
+ */
+ out->make_part_black (corner.x + inter_size.width, (out_size.width - inter_size.width) / 2);
if (
video_range == VideoRange::VIDEO &&