]> git.sesse.net Git - ffmpeg/blobdiff - ffserver.c
sweeping change from -EIO -> AVERROR_IO
[ffmpeg] / ffserver.c
index eb8b37d0ae7fded662b9455552a7ed9981c88822..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;
@@ -4061,6 +4062,11 @@ static int parse_ffconfig(const char *filename)
                     errors++;
                 }
             }
+        } else if (!strcasecmp(cmd, "VideoBufferSize")) {
+            if (stream) {
+                get_arg(arg, sizeof(arg), &p);
+                video_enc.rc_buffer_size = atoi(arg) * 1024;
+            }
         } else if (!strcasecmp(cmd, "VideoBitRateTolerance")) {
             if (stream) {
                 get_arg(arg, sizeof(arg), &p);