fixed yuy16_compress_to_yuy() sometimes writing all green video with YUV2 and UYVY (nw)

This commit is contained in:
Oliver Stöneberg 2013-06-19 16:22:30 +00:00
parent 3e3f3aad8c
commit 72cce63c4a

View File

@ -2452,7 +2452,7 @@ static avi_error yuy16_compress_to_yuy(avi_stream *stream, const bitmap_yuy16 &b
case FORMAT_VYUY:
case FORMAT_YUY2:
for (x = 0; x < stream->width && source < dataend; x++)
for (x = 0; x < stream->width && dest < dataend; x++)
{
UINT16 pix = *source++;
*dest++ = (pix >> 8) | (pix << 8);