diff options
author | Ronald Bultje <rsbultje@gmail.com> | 2012-03-31 17:10:54 +0000 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2013-03-17 07:36:54 +0100 |
commit | 327ff82bac3081d918dceb4931c77e25d0a1480d (patch) | |
tree | 5c0e57fbc2bb1184d14b925fc26ae7e58f1a4743 /libavcodec/bmp.c | |
parent | e91a6249b69599b153afcb170236e5c86fa8b87d (diff) | |
download | ffmpeg-327ff82bac3081d918dceb4931c77e25d0a1480d.tar.gz |
msrle: convert MS RLE decoding function to bytestream2.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
(cherry picked from commit 992f71e95dcf57c917531f126ba7499ef9ed87d3)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Diffstat (limited to 'libavcodec/bmp.c')
-rw-r--r-- | libavcodec/bmp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/bmp.c b/libavcodec/bmp.c index 974db4953c..01c6fb0c7a 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]; |