diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-06-09 06:47:19 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-06-09 06:47:19 +0400 |
commit | f9ecb849ef39bc337d9439b829fe08da5c95cc3d (patch) | |
tree | 761e860a10084d8de4f07815911f697fe11610b9 /libavformat/matroskadec.c | |
parent | 7b8ed831eb8432d202dad16dedc1758b018bb1fa (diff) | |
parent | a71bcd1a7f66e210971c44452dc4cdae7bdbd98a (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/matroskadec.c')
-rw-r--r-- | libavformat/matroskadec.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 031e89ac8d..8fafbb33bf 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -42,6 +42,7 @@ #include "libavutil/intreadwrite.h" #include "libavutil/avstring.h" #include "libavutil/lzo.h" +#include "libavutil/dict.h" #if CONFIG_ZLIB #include <zlib.h> #endif @@ -1073,7 +1074,7 @@ static void matroska_merge_packets(AVPacket *out, AVPacket *in) } static void matroska_convert_tag(AVFormatContext *s, EbmlList *list, - AVMetadata **metadata, char *prefix) + AVDictionary **metadata, char *prefix) { MatroskaTag *tags = list->elem; char key[1024]; @@ -1089,14 +1090,14 @@ static void matroska_convert_tag(AVFormatContext *s, EbmlList *list, if (prefix) snprintf(key, sizeof(key), "%s/%s", prefix, tags[i].name); else av_strlcpy(key, tags[i].name, sizeof(key)); if (tags[i].def || !lang) { - av_metadata_set2(metadata, key, tags[i].string, 0); + av_dict_set(metadata, key, tags[i].string, 0); if (tags[i].sub.nb_elem) matroska_convert_tag(s, &tags[i].sub, metadata, key); } if (lang) { av_strlcat(key, "-", sizeof(key)); av_strlcat(key, lang, sizeof(key)); - av_metadata_set2(metadata, key, tags[i].string, 0); + av_dict_set(metadata, key, tags[i].string, 0); if (tags[i].sub.nb_elem) matroska_convert_tag(s, &tags[i].sub, metadata, key); } @@ -1269,7 +1270,7 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap) if (matroska->duration) matroska->ctx->duration = matroska->duration * matroska->time_scale * 1000 / AV_TIME_BASE; - av_metadata_set2(&s->metadata, "title", matroska->title, 0); + av_dict_set(&s->metadata, "title", matroska->title, 0); tracks = matroska->tracks.elem; for (i=0; i < matroska->tracks.nb_elem; i++) { @@ -1467,8 +1468,8 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap) st->codec->codec_id = codec_id; st->start_time = 0; if (strcmp(track->language, "und")) - av_metadata_set2(&st->metadata, "language", track->language, 0); - av_metadata_set2(&st->metadata, "title", track->name, 0); + av_dict_set(&st->metadata, "language", track->language, 0); + av_dict_set(&st->metadata, "title", track->name, 0); if (track->flag_default) st->disposition |= AV_DISPOSITION_DEFAULT; @@ -1550,7 +1551,7 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap) AVStream *st = av_new_stream(s, 0); if (st == NULL) break; - av_metadata_set2(&st->metadata, "filename",attachements[j].filename, 0); + av_dict_set(&st->metadata, "filename",attachements[j].filename, 0); st->codec->codec_id = CODEC_ID_NONE; st->codec->codec_type = AVMEDIA_TYPE_ATTACHMENT; st->codec->extradata = av_malloc(attachements[j].bin.size); @@ -1578,7 +1579,7 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap) ff_new_chapter(s, chapters[i].uid, (AVRational){1, 1000000000}, chapters[i].start, chapters[i].end, chapters[i].title); - av_metadata_set2(&chapters[i].chapter->metadata, + av_dict_set(&chapters[i].chapter->metadata, "title", chapters[i].title, 0); max_start = chapters[i].start; } |