aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples/vaapi_encode.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-05-20 21:52:09 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-05-21 05:30:26 +0200
commitdbacecd347599aa421be94ad5e16521aa51f7014 (patch)
treeda8c6973f3437e92d55dae697368277222c51b88 /doc/examples/vaapi_encode.c
parent9f6b738896196ffb911f75719d00b63ebc7ea217 (diff)
downloadffmpeg-dbacecd347599aa421be94ad5e16521aa51f7014.tar.gz
avformat/ttaenc: Defer freeing dynamic buffer
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: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'doc/examples/vaapi_encode.c')
0 files changed, 0 insertions, 0 deletions