]> git.sesse.net Git - ffmpeg/blobdiff - ffserver.c
Improve grammar: "X next after Y" -> "next X after Y".
[ffmpeg] / ffserver.c
index d2bdcc328e779065cf8d5e7adbb6d441c9f3d220..9236050e124214cfb43e30c5d3d81af502de25f1 100644 (file)
@@ -32,7 +32,7 @@
 #include "libavformat/avformat.h"
 #include "libavformat/network.h"
 #include "libavformat/os_support.h"
-#include "libavformat/rtp.h"
+#include "libavformat/rtpdec.h"
 #include "libavformat/rtsp.h"
 #include "libavutil/avstring.h"
 #include "libavutil/random.h"
@@ -103,6 +103,11 @@ static const char *http_state[] = {
 
 #define SYNC_TIMEOUT (10 * 1000)
 
+typedef struct RTSPActionServerSetup {
+    uint32_t ipaddr;
+    char transport_option[512];
+} RTSPActionServerSetup;
+
 typedef struct {
     int64_t count1, count2;
     int64_t time1, time2;
@@ -2408,7 +2413,10 @@ static int http_start_receive_data(HTTPContext *c)
     }
     c->feed_fd = fd;
 
-    c->stream->feed_write_index = ffm_read_write_index(fd);
+    if ((c->stream->feed_write_index = ffm_read_write_index(fd)) < 0) {
+        http_log("Error reading write index from feed file: %s\n", strerror(errno));
+        return -1;
+    }
     c->stream->feed_size = lseek(fd, 0, SEEK_END);
     lseek(fd, 0, SEEK_SET);
 
@@ -2474,7 +2482,10 @@ static int http_receive_data(HTTPContext *c)
                 feed->feed_write_index = FFM_PACKET_SIZE;
 
             /* write index */
-            ffm_write_write_index(c->feed_fd, feed->feed_write_index);
+            if (ffm_write_write_index(c->feed_fd, feed->feed_write_index) < 0) {
+                http_log("Error writing index to feed file: %s\n", strerror(errno));
+                goto fail;
+            }
 
             /* wake up any waiting connections */
             for(c1 = first_http_ctx; c1 != NULL; c1 = c1->next) {
@@ -2706,7 +2717,7 @@ static int prepare_sdp_description(FFStream *stream, uint8_t **pbuffer,
     AVStream avs[MAX_STREAMS];
     int i;
 
-    avc =  av_alloc_format_context();
+    avc =  avformat_alloc_context();
     if (avc == NULL) {
         return -1;
     }
@@ -3149,7 +3160,7 @@ static int rtp_new_av_stream(HTTPContext *c,
     int max_packet_size;
 
     /* now we can open the relevant output stream */
-    ctx = av_alloc_format_context();
+    ctx = avformat_alloc_context();
     if (!ctx)
         return -1;
     ctx->oformat = guess_format("rtp", NULL, NULL);
@@ -4441,7 +4452,7 @@ static void handle_child_exit(int sig)
     need_to_start_children = 1;
 }
 
-static void opt_debug()
+static void opt_debug(void)
 {
     ffserver_debug = 1;
     ffserver_daemon = 0;