Commit d2265ed4 authored by bcoudurier's avatar bcoudurier

check if stream is set, fix potential segv

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@15693 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 6090d3d0
...@@ -4018,11 +4018,13 @@ static int parse_ffconfig(const char *filename) ...@@ -4018,11 +4018,13 @@ static int parse_ffconfig(const char *filename)
} }
} else if (!strcasecmp(cmd, "InputFormat")) { } else if (!strcasecmp(cmd, "InputFormat")) {
get_arg(arg, sizeof(arg), &p); get_arg(arg, sizeof(arg), &p);
if (stream) {
stream->ifmt = av_find_input_format(arg); stream->ifmt = av_find_input_format(arg);
if (!stream->ifmt) { if (!stream->ifmt) {
fprintf(stderr, "%s:%d: Unknown input format: %s\n", fprintf(stderr, "%s:%d: Unknown input format: %s\n",
filename, line_num, arg); filename, line_num, arg);
} }
}
} else if (!strcasecmp(cmd, "FaviconURL")) { } else if (!strcasecmp(cmd, "FaviconURL")) {
if (stream && stream->stream_type == STREAM_TYPE_STATUS) { if (stream && stream->stream_type == STREAM_TYPE_STATUS) {
get_arg(stream->feed_filename, sizeof(stream->feed_filename), &p); get_arg(stream->feed_filename, sizeof(stream->feed_filename), &p);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment