Skip to content
Snippets Groups Projects
ffserver.c 126 KiB
Newer Older
  • Learn to ignore specific revisions
  •     if ((cfg_parsed = ffserver_parse_ffconfig(config.filename, &config)) < 0) {
    
            fprintf(stderr, "Error reading configuration file '%s': %s\n",
    
                    config.filename, av_err2str(cfg_parsed));
            goto bail;
    
    Fabrice Bellard's avatar
    Fabrice Bellard committed
        }
    
    
        /* open log file if needed */
    
        if (config.logfilename[0] != '\0') {
            if (!strcmp(config.logfilename, "-"))
    
                logfile = fopen(config.logfilename, "a");
    
            av_log_set_callback(http_av_log);
        }
    
    
        if (build_feed_streams() < 0) {
            http_log("Could not setup feed streams\n");
            goto bail;
        }
    
    Fabrice Bellard's avatar
    Fabrice Bellard committed
    
    
    Fabrice Bellard's avatar
    Fabrice Bellard committed
        /* signal init */
        signal(SIGPIPE, SIG_IGN);
    
    
            http_log("Could not start server\n");
    
    Fabrice Bellard's avatar
    Fabrice Bellard committed
        }
    
    
        ret=EXIT_SUCCESS;
    
    bail:
        av_freep (&config.filename);
        avformat_network_deinit();
        return ret;
    
    Fabrice Bellard's avatar
    Fabrice Bellard committed
    }