diff options
author | Lukasz Marek <lukasz.m.luki2@gmail.com> | 2014-10-19 16:59:02 +0200 |
---|---|---|
committer | Lukasz Marek <lukasz.m.luki2@gmail.com> | 2014-10-22 22:37:40 +0200 |
commit | d2f8ca4959a146ee97702d963eb48620519f2e64 (patch) | |
tree | e2b87f66b1cbf7e4ab7edd9bd2278bfe3956ef00 /ffserver_config.c | |
parent | f524d2e47c055ce304d76bc87da9efb72e376eac (diff) | |
download | ffmpeg-d2f8ca4959a146ee97702d963eb48620519f2e64.tar.gz |
ffserver_config: clean up variable initialization
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Diffstat (limited to 'ffserver_config.c')
-rw-r--r-- | ffserver_config.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/ffserver_config.c b/ffserver_config.c index 927b6fe592..351c4e9c18 100644 --- a/ffserver_config.c +++ b/ffserver_config.c @@ -341,11 +341,11 @@ int ffserver_parse_ffconfig(const char *filename, FFServerConfig *config) char cmd[64]; char arg[1024], arg2[1024]; const char *p; - int val, errors, warnings, line_num; - FFServerStream **last_stream, *stream, *redirect; - FFServerStream **last_feed, *feed, *s; + int val, errors = 0, warnings = 0, line_num = 0; + FFServerStream **last_stream, *stream = NULL, *redirect = NULL; + FFServerStream **last_feed, *feed = NULL; AVCodecContext audio_enc, video_enc; - enum AVCodecID audio_id, video_id; + enum AVCodecID audio_id = AV_CODEC_ID_NONE, video_id = AV_CODEC_ID_NONE; int ret = 0; av_assert0(config); @@ -357,17 +357,10 @@ int ffserver_parse_ffconfig(const char *filename, FFServerConfig *config) return ret; } - errors = warnings = 0; - line_num = 0; config->first_stream = NULL; last_stream = &config->first_stream; config->first_feed = NULL; last_feed = &config->first_feed; - stream = NULL; - feed = NULL; - redirect = NULL; - audio_id = AV_CODEC_ID_NONE; - video_id = AV_CODEC_ID_NONE; #define ERROR(...) report_config_error(filename, line_num, AV_LOG_ERROR, &errors, __VA_ARGS__) #define WARNING(...) report_config_error(filename, line_num, AV_LOG_WARNING, &warnings, __VA_ARGS__) @@ -448,6 +441,7 @@ int ffserver_parse_ffconfig(const char *filename, FFServerConfig *config) if (stream || feed) { ERROR("Already in a tag\n"); } else { + FFServerStream *s; feed = av_mallocz(sizeof(FFServerStream)); if (!feed) { ret = AVERROR(ENOMEM); |