Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-06-09 06:47:19 +0400
committerMichael Niedermayer <michaelni@gmx.at>2011-06-09 06:47:19 +0400
commitf9ecb849ef39bc337d9439b829fe08da5c95cc3d (patch)
tree761e860a10084d8de4f07815911f697fe11610b9 /libavformat/avidec.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/avidec.c')
-rw-r--r--libavformat/avidec.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 19c6e7c754..41bc4ad7f3 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -26,6 +26,7 @@
#include "libavutil/intreadwrite.h"
#include "libavutil/bswap.h"
#include "libavutil/opt.h"
+#include "libavutil/dict.h"
#include "avformat.h"
#include "avi.h"
#include "dv.h"
@@ -280,8 +281,8 @@ static int avi_read_tag(AVFormatContext *s, AVStream *st, uint32_t tag, uint32_t
AV_WL32(key, tag);
- return av_metadata_set2(st ? &st->metadata : &s->metadata, key, value,
- AV_METADATA_DONT_STRDUP_VAL);
+ return av_dict_set(st ? &st->metadata : &s->metadata, key, value,
+ AV_DICT_DONT_STRDUP_VAL);
}
static void avi_read_info(AVFormatContext *s, uint64_t end)
@@ -296,7 +297,7 @@ static void avi_read_info(AVFormatContext *s, uint64_t end)
static const char months[12][4] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
-static void avi_metadata_creation_time(AVMetadata **metadata, char *date)
+static void avi_metadata_creation_time(AVDictionary **metadata, char *date)
{
char month[4], time[9], buffer[64];
int i, day, year;
@@ -307,11 +308,11 @@ static void avi_metadata_creation_time(AVMetadata **metadata, char *date)
if (!strcasecmp(month, months[i])) {
snprintf(buffer, sizeof(buffer), "%.4d-%.2d-%.2d %s",
year, i+1, day, time);
- av_metadata_set2(metadata, "creation_time", buffer, 0);
+ av_dict_set(metadata, "creation_time", buffer, 0);
}
} else if (date[4] == '/' && date[7] == '/') {
date[4] = date[7] = '-';
- av_metadata_set2(metadata, "creation_time", date, 0);
+ av_dict_set(metadata, "creation_time", date, 0);
}
}
@@ -339,7 +340,7 @@ static void avi_read_nikon(AVFormatContext *s, uint64_t end)
break;
}
if (name)
- av_metadata_set2(&s->metadata, name, buffer, 0);
+ av_dict_set(&s->metadata, name, buffer, 0);
avio_skip(s->pb, size);
}
break;
@@ -795,7 +796,7 @@ static int read_gab2_sub(AVStream *st, AVPacket *pkt) {
ret = avio_get_str16le(pb, desc_len, desc, sizeof(desc));
avio_skip(pb, desc_len - ret);
if (*desc)
- av_metadata_set2(&st->metadata, "title", desc, 0);
+ av_dict_set(&st->metadata, "title", desc, 0);
avio_rl16(pb); /* flags? */
avio_rl32(pb); /* data size */