[vlc-devel] [PATCH 11/15] yuv: use the source visible area to shift pixels
Steve Lhomme
robux4 at ycbcr.xyz
Thu Sep 3 07:52:28 CEST 2020
The values are always the same as in the output format.
They may change if the cropping changes, which will break the YUV output.
---
modules/video_output/yuv.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/video_output/yuv.c b/modules/video_output/yuv.c
index f5789cce28e..2ff32883e53 100644
--- a/modules/video_output/yuv.c
+++ b/modules/video_output/yuv.c
@@ -231,8 +231,8 @@ static void Display(vout_display_t *vd, picture_t *picture)
const plane_t *plane = &picture->p[i];
const uint8_t *pixels = plane->p_pixels;
- pixels += (vd->fmt->i_x_offset * plane->i_visible_pitch)
- / vd->fmt->i_visible_height;
+ pixels += (vd->source->i_x_offset * plane->i_visible_pitch)
+ / vd->source->i_visible_height;
for( int y = 0; y < plane->i_visible_lines; y++) {
const size_t written = fwrite(pixels, 1, plane->i_visible_pitch,
--
2.26.2
More information about the vlc-devel
mailing list