• Andreas Rheinhardt's avatar
    avformat/matroskadec: Move AVBufferRef instead of copying, fix memleak · 751f2851
    Andreas Rheinhardt authored
    EBML binary elements are already made reference-counted when read;
    so when populating the AVStream.attached_pic, one does not need to
    allocate a new buffer for the data; instead the current code just
    creates a new reference to the underlying AVBuffer. But this can be
    improved even further: Just move the already existing reference.
    
    This also fixes a memleak that happens upon error because
    matroska_read_close has not been called in this scenario.
    Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
    (cherry picked from commit cbe336c9e81e2d9de3a18abef887c9255a9b9da5)
    751f2851
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...
.mailmap 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...
RELEASE_NOTES Loading commit data...
configure Loading commit data...