• Andreas Rheinhardt's avatar
    avformat/matroskadec: Fix lzo decompression · 2ff687c1
    Andreas Rheinhardt authored
    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: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
    Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
    2ff687c1
Name
Last commit
Last update
compat Loading commit data...
doc Loading commit data...
ffbuild Loading commit data...
fftools Loading commit data...
libavcodec Loading commit data...
libavdevice Loading commit data...
libavfilter Loading commit data...
libavformat Loading commit data...
libavresample Loading commit data...
libavutil Loading commit data...
libpostproc Loading commit data...
libswresample Loading commit data...
libswscale Loading commit data...
presets Loading commit data...
tests Loading commit data...
tools Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.travis.yml Loading commit data...
CONTRIBUTING.md Loading commit data...
COPYING.GPLv2 Loading commit data...
COPYING.GPLv3 Loading commit data...
COPYING.LGPLv2.1 Loading commit data...
COPYING.LGPLv3 Loading commit data...
CREDITS Loading commit data...
Changelog Loading commit data...
INSTALL.md Loading commit data...
LICENSE.md Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
RELEASE Loading commit data...
configure Loading commit data...