summaryrefslogtreecommitdiff
path: root/libavcodec/bmp.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-04-13 00:39:19 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-04-13 00:39:19 +0200
commitca19862d3879dfadfd6c1a1a443eac40fc433385 (patch)
treedc114d719849d6c3645063e02378dfddecbc991a /libavcodec/bmp.c
parent5eeecde859ebfa384fbe3c8a1aa62a6b8f6c58e4 (diff)
parent18e8fef7c9292041e3266487d9bc6b59e5eaa798 (diff)
downloadffmpeg-ca19862d3879dfadfd6c1a1a443eac40fc433385.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: libxvid: remove disabled code qdm2: make a table static const qdm2: simplify bitstream reader setup for some subpacket types qdm2: use get_bits_left() build: Consistently handle conditional compilation for all optimization OBJS. avpacket, bfi, bgmc, rawenc: K&R prettyprinting cosmetics msrle: convert MS RLE decoding function to bytestream2. x86inc improvements for 64-bit Conflicts: common.mak libavcodec/avpacket.c libavcodec/bfi.c libavcodec/msrledec.c libavcodec/qdm2.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
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 4031764597..b6bc830662 100644
--- a/libavcodec/bmp.c
+++ b/libavcodec/bmp.c
@@ -53,6 +53,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);
@@ -269,7 +270,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];