From d2d67e424fa10d883e13709095c80bd3b502ce03 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 22 May 2011 12:46:29 +0200 Subject: Remove all uses of now deprecated metadata functions. --- libavformat/flvdec.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'libavformat/flvdec.c') diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index 6fdbf9b464..c6b386e28f 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -25,6 +25,7 @@ */ #include "libavutil/avstring.h" +#include "libavutil/dict.h" #include "libavcodec/bytestream.h" #include "libavcodec/mpeg4audio.h" #include "avformat.h" @@ -271,17 +272,17 @@ static int amf_parse_object(AVFormatContext *s, AVStream *astream, AVStream *vst if(amf_type == AMF_DATA_TYPE_BOOL) { av_strlcpy(str_val, num_val > 0 ? "true" : "false", sizeof(str_val)); - av_metadata_set2(&s->metadata, key, str_val, 0); + av_dict_set(&s->metadata, key, str_val, 0); } else if(amf_type == AMF_DATA_TYPE_NUMBER) { snprintf(str_val, sizeof(str_val), "%.f", num_val); - av_metadata_set2(&s->metadata, key, str_val, 0); + av_dict_set(&s->metadata, key, str_val, 0); if(!strcmp(key, "duration")) s->duration = num_val * AV_TIME_BASE; else if(!strcmp(key, "videodatarate") && vcodec && 0 <= (int)(num_val * 1024.0)) vcodec->bit_rate = num_val * 1024.0; else if(!strcmp(key, "audiodatarate") && acodec && 0 <= (int)(num_val * 1024.0)) acodec->bit_rate = num_val * 1024.0; } else if (amf_type == AMF_DATA_TYPE_STRING) - av_metadata_set2(&s->metadata, key, str_val, 0); + av_dict_set(&s->metadata, key, str_val, 0); } return 0; -- cgit v1.2.3