aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/tscc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-04-07 15:42:45 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-04-07 15:42:45 +0200
commite9d5a6f1c5b65319400a45446ae6523a2296de73 (patch)
tree11110d207fd762b9c52233cde9aba0b32090d0b1 /libavcodec/tscc.c
parent0af8ed29e4a756c3e207ac65f479c23ca8ed025b (diff)
parent327ff82bac3081d918dceb4931c77e25d0a1480d (diff)
downloadffmpeg-e9d5a6f1c5b65319400a45446ae6523a2296de73.tar.gz
Merge commit '327ff82bac3081d918dceb4931c77e25d0a1480d' into release/0.10
* commit '327ff82bac3081d918dceb4931c77e25d0a1480d': msrle: convert MS RLE decoding function to bytestream2. Update Changelog for the 0.8.6 Release wmaprodec: require block_align to be set. ivi_common: do not call MC for intra frames when dc_transform is unset roqvideodec: fix a potential infinite loop in roqvideo_decode_frame(). Revert "libmp3lame: use the correct remaining buffer size when flushing" lzo: fix overflow checking in copy_backptr() flacdec: simplify bounds checking in flac_probe() atrac3: avoid oversized shifting in decode_bytes() avconv: skip attached files when selecting streams to read from. lavf: fix arithmetic overflows in avformat_seek_file() Conflicts: Changelog avconv.c libavcodec/libmp3lame.c libavcodec/msrledec.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
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 c07f3a87f7..75728778ca 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) {