On Fri, 18 Jun 2021 23:07:58 +0200 Timo Rothenpieler <t...@rothenpieler.org> wrote:
> >> + > >> + if (inflateInit2(&stream, 32 + 15) != Z_OK) { > > > > Can you add a comment explaining the magic numbers? > > I have no idea what those numbers do, I copied them from http.c and > they work. Heh. So, I read this: https://www.zlib.net/manual.html > windowBits can also be greater than 15 for optional gzip decoding. > Add 32 to windowBits to enable zlib and gzip decoding with automatic > header detection, or add 16 to decode only the gzip format (the zlib > format will return a Z_DATA_ERROR). If a gzip stream is being > decoded, strm->adler is a CRC-32 instead of an Adler-32. Unlike the > gunzip utility and gzread() (see below), inflate() will not > automatically decode concatenated gzip streams. inflate() will return > Z_STREAM_END at the end of the gzip stream. The state would need to > be reset to continue decoding a subsequent gzip stream. I think that means it is necessary to pass '32 + 15' although you might do '32 + 16' because you know that the files were really gzipped. --phil _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".