avcodec/tiff: Avoid duplicating strings

Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
release/7.0
Andreas Rheinhardt 11 months ago
parent 9b9b574191
commit 957053b52a
  1. 3
      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); av_log(avctx, AV_LOG_WARNING, "Type of GeoTIFF key %d is wrong\n", s->geotags[i].key);
continue; 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) { if (ret<0) {
av_log(avctx, AV_LOG_ERROR, "Writing metadata with key '%s' failed\n", keyname); av_log(avctx, AV_LOG_ERROR, "Writing metadata with key '%s' failed\n", keyname);
return ret; return ret;

Loading…
Cancel
Save