]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
convert ffserver to new metadata API
authoraurel <aurel@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sun, 1 Mar 2009 14:56:27 +0000 (14:56 +0000)
committeraurel <aurel@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sun, 1 Mar 2009 14:56:27 +0000 (14:56 +0000)
git-svn-id: file:///var/local/repositories/ffmpeg/trunk@17685 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

ffserver.c

index 4e746cb1af92793cbe4b4c5a9a9b56357e49e616..bfdd1887f0781dda33cc33bb7439ed6ae0a9b3b2 100644 (file)
@@ -2043,14 +2043,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_strlcpy(c->fmt_ctx.author, c->stream->author,
-                   sizeof(c->fmt_ctx.author));
-        av_strlcpy(c->fmt_ctx.comment, c->stream->comment,
-                   sizeof(c->fmt_ctx.comment));
-        av_strlcpy(c->fmt_ctx.copyright, c->stream->copyright,
-                   sizeof(c->fmt_ctx.copyright));
-        av_strlcpy(c->fmt_ctx.title, c->stream->title,
-                   sizeof(c->fmt_ctx.title));
+        av_metadata_set(&c->fmt_ctx.metadata, "author"   ,c->stream->author);
+        av_metadata_set(&c->fmt_ctx.metadata, "comment"  ,c->stream->comment);
+        av_metadata_set(&c->fmt_ctx.metadata, "copyright",c->stream->copyright);
+        av_metadata_set(&c->fmt_ctx.metadata, "title"    ,c->stream->title);
 
         for(i=0;i<c->stream->nb_streams;i++) {
             AVStream *st;
@@ -2721,11 +2717,8 @@ static int prepare_sdp_description(FFStream *stream, uint8_t **pbuffer,
     if (avc == NULL) {
         return -1;
     }
-    if (stream->title[0] != 0) {
-        av_strlcpy(avc->title, stream->title, sizeof(avc->title));
-    } else {
-        av_strlcpy(avc->title, "No Title", sizeof(avc->title));
-    }
+    av_metadata_set(&avc->metadata, "title",
+                    stream->title[0] ? stream->title : "No Title");
     avc->nb_streams = stream->nb_streams;
     if (stream->is_multicast) {
         snprintf(avc->filename, 1024, "rtp://%s:%d?multicast=1?ttl=%d",