avcodec/vc1: fix calculation of the last line of a slice
[ffmpeg.git] / libavcodec / ffv1enc_template.c
index b933365..bc0add5 100644 (file)
@@ -160,7 +160,7 @@ static int RENAME(encode_rgb_frame)(FFV1Context *s, const uint8_t *src[4],
                 b = p[2];
                 if (transparency)
                   a = p[3];
-            } else if (sizeof(TYPE) == 4) {
+            } else if (sizeof(TYPE) == 4 || transparency) {
                 g = *((const uint16_t *)(src[0] + x*2 + stride[0]*y));
                 b = *((const uint16_t *)(src[1] + x*2 + stride[1]*y));
                 r = *((const uint16_t *)(src[2] + x*2 + stride[2]*y));