• Andreas Rheinhardt's avatar
    avformat/oggenc: Don't free AVStream's priv_data, fix memleak · 0fcf74f4
    Andreas Rheinhardt authored
    For FLAC, Speex, Opus and VP8 the Ogg muxer allocates two buffers
    for building the headers: The first for extradata in an Ogg-specific
    format and the second contains a Vorbiscomment. These buffers are
    reachable via pointers in the corresponding AVStream's priv_data.
    
    If an error happens during building the headers, the AVStream's
    priv_data would be freed. This is pointless in general as it would be
    freed generically anyway, but here it is actively harmful: If the second
    of the aforementioned allocations fails, the first buffer would leak
    upon freeing priv_data.
    
    This commit stops freeing priv_data manually, which allows the muxer to
    properly clean up in the deinit function.
    Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
    0fcf74f4
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...
configure Loading commit data...