summaryrefslogtreecommitdiff
path: root/ffserver.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-06-09 04:47:19 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-06-09 04:47:19 +0200
commitf9ecb849ef39bc337d9439b829fe08da5c95cc3d (patch)
tree761e860a10084d8de4f07815911f697fe11610b9 /ffserver.c
parent7b8ed831eb8432d202dad16dedc1758b018bb1fa (diff)
parenta71bcd1a7f66e210971c44452dc4cdae7bdbd98a (diff)
downloadffmpeg-f9ecb849ef39bc337d9439b829fe08da5c95cc3d.tar.gz
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 'ffserver.c')
-rw-r--r--ffserver.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/ffserver.c b/ffserver.c
index ab16aa76e5..e222887c65 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);