]> git.sesse.net Git - ffmpeg/blobdiff - ffserver.c
- Support empty GOB's (no mb's) and skip all mb's
[ffmpeg] / ffserver.c
index e550d00c2550aecd7a816d70ec7e6669163258d4..7423abc07b40f85c33f2aea064eb92ffde714929 100644 (file)
@@ -26,6 +26,7 @@
 #include <sys/poll.h>
 #include <errno.h>
 #include <sys/time.h>
+#undef time //needed because HAVE_AV_CONFIG_H is defined on top
 #include <time.h>
 #include <sys/types.h>
 #include <sys/socket.h>
@@ -1468,7 +1469,7 @@ static int http_parse_request(HTTPContext *c)
                 if (eol) {
                     if (eol[-1] == '\r')
                         eol--;
-                    http_log("%.*s\n", eol - logline, logline);
+                    http_log("%.*s\n", (int) (eol - logline), logline);
                     c->suppress_log = 1;
                 }
             }
@@ -2162,7 +2163,7 @@ static int http_prepare_data(HTTPContext *c)
                             /* XXX: potential leak */
                             return -1;
                         }
-                        if (av_write_frame(ctx, pkt.stream_index, pkt.data, pkt.size)) {
+                        if (av_write_frame(ctx, &pkt)) {
                             c->state = HTTPSTATE_SEND_DATA_TRAILER;
                         }
                         
@@ -3124,7 +3125,7 @@ static int rtp_new_av_stream(HTTPContext *c,
     int max_packet_size;
     
     /* now we can open the relevant output stream */
-    ctx = av_mallocz(sizeof(AVFormatContext));
+    ctx = av_alloc_format_context();
     if (!ctx)
         return -1;
     ctx->oformat = &rtp_mux;