diff options
author | Ronald Bultje <rsbultje@gmail.com> | 2012-03-31 17:10:54 +0000 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2012-04-11 16:30:41 -0400 |
commit | 992f71e95dcf57c917531f126ba7499ef9ed87d3 (patch) | |
tree | 86b87901df13fd4a3df9eb668079e92653c4f28e /libavcodec/tscc.c | |
parent | 729f90e26802057f06905ab15a34612168eeac80 (diff) | |
download | ffmpeg-992f71e95dcf57c917531f126ba7499ef9ed87d3.tar.gz |
msrle: convert MS RLE decoding function to bytestream2.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
Diffstat (limited to 'libavcodec/tscc.c')
-rw-r--r-- | libavcodec/tscc.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libavcodec/tscc.c b/libavcodec/tscc.c index 3e3073d3cd..c1c6eb4e60 100644 --- a/libavcodec/tscc.c +++ b/libavcodec/tscc.c @@ -58,6 +58,7 @@ typedef struct TsccContext { unsigned int decomp_size; // Decompression buffer unsigned char* decomp_buf; + GetByteContext gb; int height; z_stream zstream; @@ -105,8 +106,11 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac } - if(zret != Z_DATA_ERROR) - ff_msrle_decode(avctx, (AVPicture*)&c->pic, c->bpp, c->decomp_buf, c->decomp_size - c->zstream.avail_out); + if (zret != Z_DATA_ERROR) { + bytestream2_init(&c->gb, c->decomp_buf, + c->decomp_size - c->zstream.avail_out); + ff_msrle_decode(avctx, (AVPicture*)&c->pic, c->bpp, &c->gb); + } /* make the palette available on the way out */ if (c->avctx->pix_fmt == PIX_FMT_PAL8) { |