diff options
author | Anton Khirnov <anton@khirnov.net> | 2011-05-22 12:46:29 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2011-06-08 07:43:45 +0200 |
commit | d2d67e424fa10d883e13709095c80bd3b502ce03 (patch) | |
tree | 3ff3180c011e728fbda17dd40e200c0f4946eb07 /libavformat/avidec.c | |
parent | d9f80ea2a7325f9c84307568843512811a99baff (diff) | |
download | ffmpeg-d2d67e424fa10d883e13709095c80bd3b502ce03.tar.gz |
Remove all uses of now deprecated metadata functions.
Diffstat (limited to 'libavformat/avidec.c')
-rw-r--r-- | libavformat/avidec.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c index dd2d1d0da6..a915cc6588 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -25,6 +25,7 @@ #include <strings.h> #include "libavutil/intreadwrite.h" #include "libavutil/bswap.h" +#include "libavutil/dict.h" #include "avformat.h" #include "avi.h" #include "dv.h" @@ -261,8 +262,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) @@ -277,7 +278,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; @@ -288,11 +289,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); } } @@ -320,7 +321,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; @@ -770,7 +771,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 */ |