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

index 83d7d13..06777d7 100644 (file)
@@ -184,9 +184,9 @@ static int msrle_decode_8_16_24_32(AVCodecContext *avctx, AVPicture *pic,
             }
 
             if ((depth == 8) || (depth == 24)) {
-                for(i = 0; i < p2 * (depth >> 3); i++) {
-                    *output++ = bytestream2_get_byteu(gb);
-                }
+                bytestream2_get_bufferu(gb, output, p2 * (depth >> 3));
+                output += p2 * (depth >> 3);
+
                 // RLE8 copy is actually padded - and runs are not!
                 if(depth == 8 && (p2 & 1)) {
                     bytestream2_skip(gb, 1);