1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-19 05:49:09 +02:00
FFmpeg/libavformat
Andreas Rheinhardt 2ff687c17f avformat/matroskadec: Fix lzo decompression
When a Matroska Block is only stored in compressed form, the size of
the uncompressed block is not explicitly coded and therefore not known
before decompressing it. Therefore the demuxer uses a guess for the
uncompressed size: The first guess is three times the compressed size
and if this is not enough, it is repeatedly incremented by a factor of
three. But when this happens with lzo, the decompression is neither
resumed nor started again. Instead when av_lzo1x_decode indicates that x
bytes of input data could not be decoded, because the output buffer is
already full, the first (not the last) x bytes of the input buffer are
resent for decoding in the next try; they overwrite already decoded
data.

This commit fixes this by instead restarting the decompression anew,
just with a bigger buffer.

This seems to be a regression since 935ec5a1.

A FATE-test for this has been added.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-12-28 22:40:13 -03:00
..
2019-12-12 19:25:33 +01:00
2019-12-12 19:25:33 +01:00
2019-12-12 19:25:33 +01:00
2019-11-29 19:58:35 +01:00
2019-12-12 19:25:33 +01:00
2019-12-12 19:25:33 +01:00
2019-12-12 19:25:33 +01:00
2019-12-12 19:25:33 +01:00
2019-12-12 19:25:33 +01:00
2019-12-25 22:10:47 +01:00
2019-10-29 16:20:33 +01:00
2019-12-12 19:25:33 +01:00
2019-12-12 19:25:33 +01:00
2019-10-24 19:45:17 +02:00
2019-12-11 16:24:16 +01:00
2019-12-12 19:25:33 +01:00
2019-12-12 19:25:33 +01:00
2019-12-12 19:25:33 +01:00
2019-12-12 19:25:33 +01:00
2019-11-27 23:54:20 +01:00
2019-12-12 19:25:33 +01:00
2019-12-12 19:25:33 +01:00
2019-12-12 19:25:33 +01:00
2019-12-12 19:25:33 +01:00
2019-12-12 19:25:33 +01:00
2019-12-12 19:25:33 +01:00
2019-12-26 22:48:44 +01:00
2019-12-12 19:25:33 +01:00