ffserver: improve feedback in case no feed is defined for a stream
authorStefano Sabatini <stefasab@gmail.com>
Fri, 29 Nov 2013 10:47:01 +0000 (11:47 +0100)
committerStefano Sabatini <stefasab@gmail.com>
Fri, 29 Nov 2013 11:11:34 +0000 (12:11 +0100)
ffserver.c

index 46c08d2..469046a 100644 (file)
@@ -3690,7 +3690,12 @@ static void build_file_streams(void)
                 av_dict_set(&stream->in_opts, "mpeg2ts_compute_pcr", "1", 0);
             }
 
-            http_log("Opening file '%s'\n", stream->feed_filename);
+            if (!stream->feed_filename[0]) {
+                http_log("Unspecified feed file for stream '%s'\n", stream->filename);
+                goto fail;
+            }
+
+            http_log("Opening feed file '%s' for stream '%s'\n", stream->feed_filename, stream->filename);
             if ((ret = avformat_open_input(&infile, stream->feed_filename, stream->ifmt, &stream->in_opts)) < 0) {
                 http_log("Could not open '%s': %d\n", stream->feed_filename, ret);
                 /* remove stream (no need to spend more time on it) */