aboutsummaryrefslogtreecommitdiffstats
path: root/ffserver.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2013-11-28 21:05:31 +0100
committerStefano Sabatini <stefasab@gmail.com>2013-11-28 23:13:45 +0100
commit77f5cb92aff4e319f6dd804e959d466cee63c4fb (patch)
tree527fc64aea3b38c37024ca25b460437912cdafff /ffserver.c
parent0e1e5d005329ea7e3f99d97bf2dfa390233fd0ff (diff)
downloadffmpeg-77f5cb92aff4e319f6dd804e959d466cee63c4fb.tar.gz
ffserver: factorize code setting ReadOnlyFile/File options
Diffstat (limited to 'ffserver.c')
-rw-r--r--ffserver.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/ffserver.c b/ffserver.c
index 4b70dc298e..1623425926 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -4209,18 +4209,13 @@ static int parse_ffconfig(const char *filename)
goto end;
}
}
- } else if (!av_strcasecmp(cmd, "ReadOnlyFile")) {
+ } else if (!av_strcasecmp(cmd, "File") || !av_strcasecmp(cmd, "ReadOnlyFile")) {
if (feed) {
get_arg(feed->feed_filename, sizeof(feed->feed_filename), &p);
- feed->readonly = 1;
+ feed->readonly = !av_strcasecmp(cmd, "ReadOnlyFile");
} else if (stream) {
get_arg(stream->feed_filename, sizeof(stream->feed_filename), &p);
}
- } else if (!av_strcasecmp(cmd, "File")) {
- if (feed) {
- get_arg(feed->feed_filename, sizeof(feed->feed_filename), &p);
- } else if (stream)
- get_arg(stream->feed_filename, sizeof(stream->feed_filename), &p);
} else if (!av_strcasecmp(cmd, "Truncate")) {
if (feed) {
get_arg(arg, sizeof(arg), &p);