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 /ffserver.c | |
parent | d9f80ea2a7325f9c84307568843512811a99baff (diff) | |
download | ffmpeg-d2d67e424fa10d883e13709095c80bd3b502ce03.tar.gz |
Remove all uses of now deprecated metadata functions.
Diffstat (limited to 'ffserver.c')
-rw-r--r-- | ffserver.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/ffserver.c b/ffserver.c index 30edb05969..0f57979c9c 100644 --- a/ffserver.c +++ b/ffserver.c @@ -36,6 +36,7 @@ #include "libavformat/avio_internal.h" #include "libavutil/avstring.h" #include "libavutil/lfg.h" +#include "libavutil/dict.h" #include "libavutil/random_seed.h" #include "libavutil/parseutils.h" #include "libavutil/opt.h" @@ -854,7 +855,7 @@ static void close_connection(HTTPContext *c) ctx = c->rtp_ctx[i]; if (ctx) { av_write_trailer(ctx); - av_metadata_free(&ctx->metadata); + av_dict_free(&ctx->metadata); av_free(ctx->streams[0]); av_free(ctx); } @@ -2224,10 +2225,10 @@ static int http_prepare_data(HTTPContext *c) switch(c->state) { case HTTPSTATE_SEND_DATA_HEADER: memset(&c->fmt_ctx, 0, sizeof(c->fmt_ctx)); - av_metadata_set2(&c->fmt_ctx.metadata, "author" , c->stream->author , 0); - av_metadata_set2(&c->fmt_ctx.metadata, "comment" , c->stream->comment , 0); - av_metadata_set2(&c->fmt_ctx.metadata, "copyright", c->stream->copyright, 0); - av_metadata_set2(&c->fmt_ctx.metadata, "title" , c->stream->title , 0); + av_dict_set(&c->fmt_ctx.metadata, "author" , c->stream->author , 0); + av_dict_set(&c->fmt_ctx.metadata, "comment" , c->stream->comment , 0); + av_dict_set(&c->fmt_ctx.metadata, "copyright", c->stream->copyright, 0); + av_dict_set(&c->fmt_ctx.metadata, "title" , c->stream->title , 0); c->fmt_ctx.streams = av_mallocz(sizeof(AVStream *) * c->stream->nb_streams); @@ -2272,7 +2273,7 @@ static int http_prepare_data(HTTPContext *c) http_log("Error writing output header\n"); return -1; } - av_metadata_free(&c->fmt_ctx.metadata); + av_dict_free(&c->fmt_ctx.metadata); len = avio_close_dyn_buf(c->fmt_ctx.pb, &c->pb_buffer); c->buffer_ptr = c->pb_buffer; @@ -2927,8 +2928,8 @@ static int prepare_sdp_description(FFStream *stream, uint8_t **pbuffer, if (avc == NULL) { return -1; } - av_metadata_set2(&avc->metadata, "title", - stream->title[0] ? stream->title : "No Title", 0); + av_dict_set(&avc->metadata, "title", + stream->title[0] ? stream->title : "No Title", 0); avc->nb_streams = stream->nb_streams; if (stream->is_multicast) { snprintf(avc->filename, 1024, "rtp://%s:%d?multicast=1?ttl=%d", @@ -2954,7 +2955,7 @@ static int prepare_sdp_description(FFStream *stream, uint8_t **pbuffer, sdp_done: av_free(avc->streams); - av_metadata_free(&avc->metadata); + av_dict_free(&avc->metadata); av_free(avc); av_free(avs); |