summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-03-09 14:28:53 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-03-12 14:37:33 +0100
commit957053b52a2dae4e80df95ec70be1a8a7f2b2365 (patch)
treeb3f7037b051cf8e8d0fdbb1e1f910f9df10c5e82 /libavcodec
parent9b9b57419197a87ed0a627af4dc5116afe82714a (diff)
avcodec/tiff: Avoid duplicating strings
Reviewed-by: Stefano Sabatini <stefasab@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/tiff.c3
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;