[FFmpeg-cvslog] ffserver: add some error handling to main()
Stefano Sabatini
git at videolan.org
Thu Nov 28 23:15:55 CET 2013
ffmpeg | branch: master | Stefano Sabatini <stefasab at gmail.com> | Thu Nov 28 16:35:50 2013 +0100| [04702a0d3d73836a3df1a5f61112b02f52c8dd8e] | committer: Stefano Sabatini
ffserver: add some error handling to main()
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=04702a0d3d73836a3df1a5f61112b02f52c8dd8e
---
ffserver.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/ffserver.c b/ffserver.c
index bbf408b..42e1f7d 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -4679,6 +4679,7 @@ static const OptionDef options[] = {
int main(int argc, char **argv)
{
struct sigaction sigact = { { 0 } };
+ int ret = 0;
config_filename = av_strdup("/etc/ffserver.conf");
@@ -4700,8 +4701,9 @@ int main(int argc, char **argv)
sigact.sa_flags = SA_NOCLDSTOP | SA_RESTART;
sigaction(SIGCHLD, &sigact, 0);
- if (parse_ffconfig(config_filename) < 0) {
- fprintf(stderr, "Incorrect config file - exiting.\n");
+ if ((ret = parse_ffconfig(config_filename)) < 0) {
+ fprintf(stderr, "Error reading configuration file '%s': %s\n",
+ config_filename, av_err2str(ret));
exit(1);
}
av_freep(&config_filename);
More information about the ffmpeg-cvslog
mailing list