summaryrefslogtreecommitdiff
path: root/libavformat/mov.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2011-05-22 12:46:29 +0200
committerAnton Khirnov <anton@khirnov.net>2011-06-08 07:43:45 +0200
commitd2d67e424fa10d883e13709095c80bd3b502ce03 (patch)
tree3ff3180c011e728fbda17dd40e200c0f4946eb07 /libavformat/mov.c
parentd9f80ea2a7325f9c84307568843512811a99baff (diff)
downloadffmpeg-d2d67e424fa10d883e13709095c80bd3b502ce03.tar.gz
Remove all uses of now deprecated metadata functions.
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 3aec86ceb1..ff32c92313 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -27,6 +27,7 @@
#include "libavutil/intreadwrite.h"
#include "libavutil/avstring.h"
+#include "libavutil/dict.h"
#include "avformat.h"
#include "avio_internal.h"
#include "riff.h"
@@ -84,7 +85,7 @@ static int mov_metadata_trkn(MOVContext *c, AVIOContext *pb, unsigned len)
avio_rb16(pb); // unknown
snprintf(buf, sizeof(buf), "%d", avio_rb16(pb));
- av_metadata_set2(&c->fc->metadata, "track", buf, 0);
+ av_dict_set(&c->fc->metadata, "track", buf, 0);
avio_rb16(pb); // total tracks
@@ -203,10 +204,10 @@ static int mov_read_udta_string(MOVContext *c, AVIOContext *pb, MOVAtom atom)
avio_read(pb, str, str_size);
str[str_size] = 0;
}
- av_metadata_set2(&c->fc->metadata, key, str, 0);
+ av_dict_set(&c->fc->metadata, key, str, 0);
if (*language && strcmp(language, "und")) {
snprintf(key2, sizeof(key2), "%s-%s", key, language);
- av_metadata_set2(&c->fc->metadata, key2, str, 0);
+ av_dict_set(&c->fc->metadata, key2, str, 0);
}
}
av_dlog(c->fc, "lang \"%3s\" ", language);
@@ -552,10 +553,10 @@ static int mov_read_ftyp(MOVContext *c, AVIOContext *pb, MOVAtom atom)
if (strcmp(type, "qt "))
c->isom = 1;
av_log(c->fc, AV_LOG_DEBUG, "ISO: File Type Major Brand: %.4s\n",(char *)&type);
- av_metadata_set2(&c->fc->metadata, "major_brand", type, 0);
+ av_dict_set(&c->fc->metadata, "major_brand", type, 0);
minor_ver = avio_rb32(pb); /* minor version */
snprintf(minor_ver_str, sizeof(minor_ver_str), "%d", minor_ver);
- av_metadata_set2(&c->fc->metadata, "minor_version", minor_ver_str, 0);
+ av_dict_set(&c->fc->metadata, "minor_version", minor_ver_str, 0);
comp_brand_size = atom.size - 8;
if (comp_brand_size < 0)
@@ -565,7 +566,7 @@ static int mov_read_ftyp(MOVContext *c, AVIOContext *pb, MOVAtom atom)
return AVERROR(ENOMEM);
avio_read(pb, comp_brands_str, comp_brand_size);
comp_brands_str[comp_brand_size] = 0;
- av_metadata_set2(&c->fc->metadata, "compatible_brands", comp_brands_str, 0);
+ av_dict_set(&c->fc->metadata, "compatible_brands", comp_brands_str, 0);
av_freep(&comp_brands_str);
return 0;
@@ -589,7 +590,7 @@ static int mov_read_moof(MOVContext *c, AVIOContext *pb, MOVAtom atom)
return mov_read_default(c, pb, atom);
}
-static void mov_metadata_creation_time(AVMetadata **metadata, time_t time)
+static void mov_metadata_creation_time(AVDictionary **metadata, time_t time)
{
char buffer[32];
if (time) {
@@ -598,7 +599,7 @@ static void mov_metadata_creation_time(AVMetadata **metadata, time_t time)
ptm = gmtime(&time);
if (!ptm) return;
strftime(buffer, sizeof(buffer), "%Y-%m-%d %H:%M:%S", ptm);
- av_metadata_set2(metadata, "creation_time", buffer, 0);
+ av_dict_set(metadata, "creation_time", buffer, 0);
}
}
@@ -635,7 +636,7 @@ static int mov_read_mdhd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
lang = avio_rb16(pb); /* language */
if (ff_mov_lang_to_iso639(lang, language))
- av_metadata_set2(&st->metadata, "language", language, 0);
+ av_dict_set(&st->metadata, "language", language, 0);
avio_rb16(pb); /* quality */
return 0;