aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-10-25 00:49:56 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-10-25 00:49:56 +0000
commita69b06be936d7a755ed1e25bd5801a5186c27fbd (patch)
treea24292e3af0b51677c1e7bde143786e16c3b415f
parentb6bb00b07db90dde1877e17f12abd3a53a5bf3a0 (diff)
downloadffmpeg-a69b06be936d7a755ed1e25bd5801a5186c27fbd.tar.gz
check if stream is set, fix potential segv
Originally committed as revision 15693 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--ffserver.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ffserver.c b/ffserver.c
index 379619f094..62d708c07a 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -4018,11 +4018,13 @@ static int parse_ffconfig(const char *filename)
}
} else if (!strcasecmp(cmd, "InputFormat")) {
get_arg(arg, sizeof(arg), &p);
+ if (stream) {
stream->ifmt = av_find_input_format(arg);
if (!stream->ifmt) {
fprintf(stderr, "%s:%d: Unknown input format: %s\n",
filename, line_num, arg);
}
+ }
} else if (!strcasecmp(cmd, "FaviconURL")) {
if (stream && stream->stream_type == STREAM_TYPE_STATUS) {
get_arg(stream->feed_filename, sizeof(stream->feed_filename), &p);