diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-03-09 14:28:53 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-03-12 14:37:33 +0100 |
commit | 957053b52a2dae4e80df95ec70be1a8a7f2b2365 (patch) | |
tree | b3f7037b051cf8e8d0fdbb1e1f910f9df10c5e82 | |
parent | 9b9b57419197a87ed0a627af4dc5116afe82714a (diff) | |
download | ffmpeg-957053b52a2dae4e80df95ec70be1a8a7f2b2365.tar.gz |
avcodec/tiff: Avoid duplicating strings
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r-- | libavcodec/tiff.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index ffd0806bd1..c45fd34dbc 100644 --- a/libavcodec/tiff.c +++ b/libavcodec/tiff.c @@ -2029,7 +2029,8 @@ again: av_log(avctx, AV_LOG_WARNING, "Type of GeoTIFF key %d is wrong\n", s->geotags[i].key); continue; } - ret = av_dict_set(&p->metadata, keyname, s->geotags[i].val, 0); + ret = av_dict_set(&p->metadata, keyname, s->geotags[i].val, AV_DICT_DONT_STRDUP_VAL); + s->geotags[i].val = NULL; if (ret<0) { av_log(avctx, AV_LOG_ERROR, "Writing metadata with key '%s' failed\n", keyname); return ret; |