summaryrefslogtreecommitdiff
path: root/ffmpeg/libavcodec/msrledec.c
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2013-12-29 12:19:38 +0000
committerTim Redfern <tim@eclectronics.org>2013-12-29 12:19:38 +0000
commitf7813a5324be39d13ab536c245d15dfc602a7849 (patch)
treefad99148b88823d34a5df2f0a25881a002eb291b /ffmpeg/libavcodec/msrledec.c
parentb7a5a477b8ff4d4e3028b9dfb9a9df0a41463f92 (diff)
basic type mechanism working
Diffstat (limited to 'ffmpeg/libavcodec/msrledec.c')
-rw-r--r--ffmpeg/libavcodec/msrledec.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ffmpeg/libavcodec/msrledec.c b/ffmpeg/libavcodec/msrledec.c
index 83d7d13..4d3da5b 100644
--- a/ffmpeg/libavcodec/msrledec.c
+++ b/ffmpeg/libavcodec/msrledec.c
@@ -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);
@@ -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);