summaryrefslogtreecommitdiff
path: root/libavcodec/tscc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/tscc.c')
-rw-r--r--libavcodec/tscc.c8
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) {