aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/indeo2data.h
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-09-13 21:07:19 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-09-14 19:01:02 +0200
commite867a29ec1eb71a5841e452a4f2bf946c096282a (patch)
treefc7427ab607e47b124941e70d2a81d0d44cd25b6 /libavcodec/indeo2data.h
parentc15dd31d2a9067b3aa7a575f585f44d62e9d5454 (diff)
downloadffmpeg-e867a29ec1eb71a5841e452a4f2bf946c096282a.tar.gz
avutil/dict: Improve appending values
When appending two values (due to AV_DICT_APPEND), the earlier code would first zero-allocate a buffer of the required size and then copy both parts into it via av_strlcat(). This is problematic, as it leads to quadratic performance in case of frequent enlargements. Fix this by using av_realloc() (which is hopefully designed to handle such cases in a better way than simply throwing the buffer we already have away) and by copying the string via memcpy() (after all, we already calculated the strlen of both strings). Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/indeo2data.h')
0 files changed, 0 insertions, 0 deletions