19#ifndef AVUTIL_ZLIB_UTILS_H
20#define AVUTIL_ZLIB_UTILS_H
28#define CHUNK_SIZE 1024 * 64
31 const uint8_t *
src,
int src_len)
35 z_stream stream = { 0 };
36 if (inflateInit2(&stream, 32 + 15) != Z_OK) {
50 stream.avail_in = src_len;
53 stream.avail_out = buf_size - stream.total_out;
54 stream.next_out = buf + stream.total_out;
56 ret =
inflate(&stream, Z_FINISH);
57 if (ret != Z_OK && ret != Z_STREAM_END && ret != Z_BUF_ERROR) {
65 if (stream.avail_out == 0) {
75 }
while (ret != Z_STREAM_END);
79 buf[stream.total_out] = 0;
84 *out_len = stream.total_out;
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Memory handling functions.
static AVFormatContext * ctx
static void inflate(uint8_t *dst, const uint8_t *p1, int width, int threshold, const uint8_t *coordinates[], int coord, int maxc)
static int ff_zlib_expand(void *ctx, uint8_t **out, size_t *out_len, const uint8_t *src, int src_len)