ffserver: improve feedback in case no feed is defined for a stream

This commit is contained in:
Stefano Sabatini 2013-11-29 11:47:01 +01:00
parent 0083514727
commit b133ec6244
1 changed files with 6 additions and 1 deletions

View 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) */