changeset 8266:ce2bb0ae8587 libavcodec

Make decoding run of pixels in MS RLE saner. This is based on patches by Alex Converse and Mans Rullgard Thread "[PATCH] Fix MSRLE type punning"
author kostya
date Sat, 06 Dec 2008 09:05:30 +0000
parents bb310197d59f
children ebbdbb35a0cf
files msrledec.c
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/msrledec.c	Sat Dec 06 09:01:11 2008 +0000
+++ b/msrledec.c	Sat Dec 06 09:05:30 2008 +0000
@@ -195,13 +195,12 @@
             }
             pos += p2;
         } else { //Run of pixels
-            int pix[4]; //original pixel
+            uint8_t pix[3]; //original pixel
             switch(depth){
             case  8: pix[0] = *src++;
                      break;
             case 16: pix16 = AV_RL16(src);
                      src += 2;
-                     *(uint16_t*)pix = pix16;
                      break;
             case 24: pix[0] = *src++;
                      pix[1] = *src++;
@@ -209,7 +208,6 @@
                      break;
             case 32: pix32 = AV_RL32(src);
                      src += 4;
-                     *(uint32_t*)pix = pix32;
                      break;
             }
             if (output + p1 * (depth >> 3) > output_end)