Fix bug in frame decompress example
The decompression was failing as the srcEnd pointer in decompress_file_internal was wrongly computed beyond the end of the memory block. We need to account for the fact that the header ("info") was already read in the calling function ("alreadyConsumed").
This commit is contained in:
parent
1466e0b7f2
commit
98c0c7cf9d
@ -260,7 +260,7 @@ decompress_file_allocDst(FILE* f_in, FILE* f_out,
|
||||
int const decompressionResult = decompress_file_internal(
|
||||
f_in, f_out,
|
||||
dctx,
|
||||
src, srcCapacity, readSize, consumedSize,
|
||||
src, srcCapacity, readSize-consumedSize, consumedSize,
|
||||
dst, dstCapacity);
|
||||
|
||||
free(dst);
|
||||
|
Loading…
Reference in New Issue
Block a user