int block_width, block_height;
uint8_t *encbuffer;
int block_size;
- z_stream zstream;
int last_key_frame;
uint8_t tmpblock[3 * 256 * 256];
} FlashSVContext;
{
FlashSVContext *s = avctx->priv_data;
- deflateEnd(&s->zstream);
-
av_freep(&s->encbuffer);
av_freep(&s->previous_frame);
return AVERROR_INVALIDDATA;
}
- // Needed if zlib unused or init aborted before deflateInit
- memset(&s->zstream, 0, sizeof(z_stream));
-
s->last_key_frame = 0;
s->image_width = avctx->width;
ret = compress2(ptr + 2, &zsize, s->tmpblock,
3 * cur_blk_width * cur_blk_height, 9);
- //ret = deflateReset(&s->zstream);
if (ret != Z_OK)
av_log(s->avctx, AV_LOG_ERROR,
"error while compressing block %dx%d\n", i, j);