aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2008-12-06 09:05:30 +0000
committerKostya Shishkov <kostya.shishkov@gmail.com>2008-12-06 09:05:30 +0000
commit6149cdbe9d41991c503889aee218a0c8ed61548f (patch)
tree4ae25e2a17a81d36592bc7d28219232423a94201 /libavcodec
parentce60c2d133876b2878b724cb512b81d4a149c72e (diff)
downloadffmpeg-6149cdbe9d41991c503889aee218a0c8ed61548f.tar.gz
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" Originally committed as revision 16013 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/msrledec.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libavcodec/msrledec.c b/libavcodec/msrledec.c
index ce3c56d471..7d09ed99a6 100644
--- a/libavcodec/msrledec.c
+++ b/libavcodec/msrledec.c
@@ -195,13 +195,12 @@ static int msrle_decode_8_16_24_32(AVCodecContext *avctx, AVPicture *pic, int de
}
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 @@ static int msrle_decode_8_16_24_32(AVCodecContext *avctx, AVPicture *pic, int de
break;
case 32: pix32 = AV_RL32(src);
src += 4;
- *(uint32_t*)pix = pix32;
break;
}
if (output + p1 * (depth >> 3) > output_end)