• Andreas Rheinhardt's avatar
    avformat/ttaenc: Defer freeing dynamic buffer · dbacecd3
    Andreas Rheinhardt authored
    The TTA muxer writes a seektable in a dynamic buffer as it receives
    packets and when writing the trailer, closes the dynamic buffer using
    avio_close_dyn_buf(), writes the seektable and frees the buffer. But
    the TTA muxer already has a deinit function which unconditionally
    calls ffio_free_dyn_buf() on the dynamic buffer, so switching to
    avio_get_dyn_buf() means that one can remove the code to free the
    buffer; furthermore, it also might save an allocation if the seektable
    is so small that it fits into the dynamic buffer's write buffer or if
    adding the padding that avio_close_dyn_buf() adds necessitated
    reallocating of the underlying buffer.
    Reviewed-by: 's avatarJames Almer <jamrial@gmail.com>
    Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
    dbacecd3
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...