History

avcodec/tiff: Avoid duplicating strings

Andreas Rheinhardt committed 2 years ago

Commit 957053b1 parent 9b9b5741 file · +2 −1Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/tiff.c+2−1
@@ -2029,7 +2029,8 @@ again: · 2028 unmodified lines
20292029 av_log(avctx, AV_LOG_WARNING, "Type of GeoTIFF key %d is wrong\n", s->geotags[i].key);
20302030 continue;
20312031 }
2032− ret = av_dict_set(&p->metadata, keyname, s->geotags[i].val, 0);
2032+ ret = av_dict_set(&p->metadata, keyname, s->geotags[i].val, AV_DICT_DONT_STRDUP_VAL);
2033+ s->geotags[i].val = NULL;
20332034 if (ret<0) {
20342035 av_log(avctx, AV_LOG_ERROR, "Writing metadata with key '%s' failed\n", keyname);
20352036 return ret;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t