From 263201d9e7e3c9b188233a7b8e50f44e5263263d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 2 Jul 2010 20:09:58 +0200 Subject: [PATCH] ffmpegcolorspace: Fix conversion of packed 4:2:2 YUV to 8 bit grayscale The last pixel wasn't written before for odd widths. Fixes bug #623418. --- gst/ffmpegcolorspace/imgconvert.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gst/ffmpegcolorspace/imgconvert.c b/gst/ffmpegcolorspace/imgconvert.c index 0d5eb74992..bc3e5206fe 100644 --- a/gst/ffmpegcolorspace/imgconvert.c +++ b/gst/ffmpegcolorspace/imgconvert.c @@ -893,6 +893,10 @@ uyvy422_to_gray (AVPicture * dst, const AVPicture * src, int width, int height) p += 4; lum += 2; } + + if (w) + lum[0] = p[1]; + p1 += src->linesize[0]; lum1 += dst->linesize[0]; } @@ -1014,6 +1018,10 @@ yvyu422_to_gray (AVPicture * dst, const AVPicture * src, int width, int height) p += 4; lum += 2; } + + if (w) + lum[0] = p[0]; + p1 += src->linesize[0]; lum1 += dst->linesize[0]; }