diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-02-18 00:27:14 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-02-22 01:45:31 +0100 |
commit | 686af4578c1ed8e3ddc88f1ce27d9c1e75452fd3 (patch) | |
tree | 91361e59b37d2e5ca991fab96a139f61754d772f /libavcodec/texturedsp.c | |
parent | b8a00a1f73331af031cbb8d718d6439522896a3f (diff) | |
download | ffmpeg-686af4578c1ed8e3ddc88f1ce27d9c1e75452fd3.tar.gz |
avcodec/srtenc: Don't copy data around unnecessarily
Using av_bprint_init_for_buffer() avoids copying data
into the internal AVBPrint buffer (or worse: to allocate
a temporary buffer in case the internal buffer does not
suffice). It also ensures that the data is always
0-terminated, whereas the current code never does this
and returns success in case the length of the
string to write and the size of the buffer coincide.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/texturedsp.c')
0 files changed, 0 insertions, 0 deletions