avformat/iamf_writer, iamfenc: Avoid allocations when using dyn buffers

Use avio_get_dyn_buf()+ffio_free_dyn_buf() instead of
avio_close_dyn_buf()+av_free(). This saves an allocation
(and memcpy) in case all the data fits in the AVIOContext's
write buffer.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2024-01-31 09:21:55 +01:00
parent b9596daafb
commit 8d4b22edc7
2 changed files with 10 additions and 10 deletions