msrledec: use memset()
authorPaul B Mahol <onemda@gmail.com>
Mon, 26 Aug 2013 15:41:29 +0000 (15:41 +0000)
committerPaul B Mahol <onemda@gmail.com>
Mon, 26 Aug 2013 19:26:01 +0000 (19:26 +0000)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavcodec/msrledec.c

index 06777d7..4d3da5b 100644 (file)
@@ -211,8 +211,8 @@ static int msrle_decode_8_16_24_32(AVCodecContext *avctx, AVPicture *pic,
             switch(depth){
             case  8:
                 pix[0] = bytestream2_get_byte(gb);
-                for(i = 0; i < p1; i++)
-                        *output++ = pix[0];
+                memset(output, pix[0], p1);
+                output += p1;
                 break;
             case 16:
                 pix16  = bytestream2_get_le16(gb);