summaryrefslogtreecommitdiff
path: root/libavcodec/bmp.c
diff options
context:
space:
mode:
authorRonald Bultje <rsbultje@gmail.com>2012-03-31 17:10:54 +0000
committerJustin Ruggles <justin.ruggles@gmail.com>2012-04-11 16:30:41 -0400
commit992f71e95dcf57c917531f126ba7499ef9ed87d3 (patch)
tree86b87901df13fd4a3df9eb668079e92653c4f28e /libavcodec/bmp.c
parent729f90e26802057f06905ab15a34612168eeac80 (diff)
msrle: convert MS RLE decoding function to bytestream2.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
Diffstat (limited to 'libavcodec/bmp.c')
-rw-r--r--libavcodec/bmp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/bmp.c b/libavcodec/bmp.c
index 5528932878..df947a0745 100644
--- a/libavcodec/bmp.c
+++ b/libavcodec/bmp.c
@@ -52,6 +52,7 @@ static int bmp_decode_frame(AVCodecContext *avctx,
uint8_t *ptr;
int dsize;
const uint8_t *buf0 = buf;
+ GetByteContext gb;
if(buf_size < 14){
av_log(avctx, AV_LOG_ERROR, "buf size too small (%d)\n", buf_size);
@@ -265,7 +266,8 @@ static int bmp_decode_frame(AVCodecContext *avctx,
p->data[0] += p->linesize[0] * (avctx->height - 1);
p->linesize[0] = -p->linesize[0];
}
- ff_msrle_decode(avctx, (AVPicture*)p, depth, buf, dsize);
+ bytestream2_init(&gb, buf, dsize);
+ ff_msrle_decode(avctx, (AVPicture*)p, depth, &gb);
if(height < 0){
p->data[0] += p->linesize[0] * (avctx->height - 1);
p->linesize[0] = -p->linesize[0];