summaryrefslogtreecommitdiff
path: root/libavformat/vorbiscomment.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-06-09 04:47:19 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-06-09 04:47:19 +0200
commitf9ecb849ef39bc337d9439b829fe08da5c95cc3d (patch)
tree761e860a10084d8de4f07815911f697fe11610b9 /libavformat/vorbiscomment.c
parent7b8ed831eb8432d202dad16dedc1758b018bb1fa (diff)
parenta71bcd1a7f66e210971c44452dc4cdae7bdbd98a (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: crypto: Use av_freep instead of av_free lavf: don't try to free private options if priv_data is NULL. swscale: fix types of assembly arguments. swscale: move two macros that are only used once into caller. swscale: remove unused function. options: Add missing braces around struct initializer. mov: Remove leftover crufty debug statement with references to a local file. dvbsubdec: Fix compilation of debug code. Remove all uses of now deprecated metadata functions. Move metadata API from lavf to lavu. Conflicts: doc/APIchanges libavformat/aiffdec.c libavformat/asfdec.c libavformat/avformat.h libavformat/avidec.c libavformat/cafdec.c libavformat/matroskaenc.c libavformat/mov.c libavformat/mp3enc.c libavformat/wtv.c libavutil/avutil.h libavutil/internal.h libswscale/swscale.c libswscale/x86/swscale_template.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/vorbiscomment.c')
-rw-r--r--libavformat/vorbiscomment.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/libavformat/vorbiscomment.c b/libavformat/vorbiscomment.c
index 59a403f209..9b38e6a791 100644
--- a/libavformat/vorbiscomment.c
+++ b/libavformat/vorbiscomment.c
@@ -23,6 +23,7 @@
#include "metadata.h"
#include "vorbiscomment.h"
#include "libavcodec/bytestream.h"
+#include "libavutil/dict.h"
/**
* VorbisComment metadata conversion mapping.
@@ -36,15 +37,15 @@ const AVMetadataConv ff_vorbiscomment_metadata_conv[] = {
{ 0 }
};
-int ff_vorbiscomment_length(AVMetadata *m, const char *vendor_string,
+int ff_vorbiscomment_length(AVDictionary *m, const char *vendor_string,
unsigned *count)
{
int len = 8;
len += strlen(vendor_string);
*count = 0;
if (m) {
- AVMetadataTag *tag = NULL;
- while ((tag = av_metadata_get(m, "", tag, AV_METADATA_IGNORE_SUFFIX))) {
+ AVDictionaryEntry *tag = NULL;
+ while ((tag = av_dict_get(m, "", tag, AV_DICT_IGNORE_SUFFIX))) {
len += 4 +strlen(tag->key) + 1 + strlen(tag->value);
(*count)++;
}
@@ -52,15 +53,15 @@ int ff_vorbiscomment_length(AVMetadata *m, const char *vendor_string,
return len;
}
-int ff_vorbiscomment_write(uint8_t **p, AVMetadata **m,
+int ff_vorbiscomment_write(uint8_t **p, AVDictionary **m,
const char *vendor_string, const unsigned count)
{
bytestream_put_le32(p, strlen(vendor_string));
bytestream_put_buffer(p, vendor_string, strlen(vendor_string));
if (*m) {
- AVMetadataTag *tag = NULL;
+ AVDictionaryEntry *tag = NULL;
bytestream_put_le32(p, count);
- while ((tag = av_metadata_get(*m, "", tag, AV_METADATA_IGNORE_SUFFIX))) {
+ while ((tag = av_dict_get(*m, "", tag, AV_DICT_IGNORE_SUFFIX))) {
unsigned int len1 = strlen(tag->key);
unsigned int len2 = strlen(tag->value);
bytestream_put_le32(p, len1+1+len2);