aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/oggparsevorbis.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2009-12-13 20:27:29 +0000
committerMichael Niedermayer <michaelni@gmx.at>2009-12-13 20:27:29 +0000
commit12ad66712a18d039eea73a742ae626b2376f8f4f (patch)
treef6d863c1a428480ad0366d48c44c8b89ef53b3e3 /libavformat/oggparsevorbis.c
parentb8f11ec8878641f699c07b8425079d3611a51072 (diff)
downloadffmpeg-12ad66712a18d039eea73a742ae626b2376f8f4f.tar.gz
Use AV_METADATA_DONT_STRDUP* / use av_malloced metadata instead of strduped
arrays of fixed length. Code from ffmbc with changes to adapt to our metadata API. Originally committed as revision 20836 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/oggparsevorbis.c')
-rw-r--r--libavformat/oggparsevorbis.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libavformat/oggparsevorbis.c b/libavformat/oggparsevorbis.c
index fd23cb06b9..6222962019 100644
--- a/libavformat/oggparsevorbis.c
+++ b/libavformat/oggparsevorbis.c
@@ -102,10 +102,9 @@ vorbis_comment(AVFormatContext * as, uint8_t *buf, int size)
memcpy(ct, v, vl);
ct[vl] = 0;
- av_metadata_set(&as->metadata, tt, ct);
-
- av_freep(&tt);
- av_freep(&ct);
+ av_metadata_set2(&as->metadata, tt, ct,
+ AV_METADATA_DONT_STRDUP_KEY |
+ AV_METADATA_DONT_STRDUP_VAL);
}
}