ffmpegcolorspace: Fix conversion of packed 4:2:2 YUV to 8 bit grayscale
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Fri, 2 Jul 2010 18:09:58 +0000 (20:09 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Fri, 2 Jul 2010 18:09:58 +0000 (20:09 +0200)
The last pixel wasn't written before for odd widths.

Fixes bug #623418.

gst/ffmpegcolorspace/imgconvert.c

index 0d5eb7499203007b69828bb02b59736200d0e070..bc3e5206feff4fbfd62f556b59cc749ec9673e0b 100644 (file)
@@ -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];
   }