aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2013-11-28 22:47:39 +0100
committerStefano Sabatini <stefasab@gmail.com>2013-11-29 10:28:03 +0100
commitb1049f89fa48ae9b038516a7194686eebaa25be7 (patch)
tree594fe1fbfc5c44344e09897de5875dba6b91c153
parent0124fca03fb34567055fd4cea32250a5138e5423 (diff)
downloadffmpeg-b1049f89fa48ae9b038516a7194686eebaa25be7.tar.gz
ffserver: deprecate inconsistent parsing behavior of Truncate option
Also make it accept the more consistent behavior (boolean option set to true when specified).
-rw-r--r--ffserver.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/ffserver.c b/ffserver.c
index a900b94ff1..6ce09c4cb8 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -4232,7 +4232,15 @@ static int parse_ffconfig(const char *filename)
} else if (!av_strcasecmp(cmd, "Truncate")) {
if (feed) {
get_arg(arg, sizeof(arg), &p);
- feed->truncate = strtod(arg, NULL);
+ /* assume Truncate is true in case no argument is specified */
+ if (!arg[0]) {
+ feed->truncate = 1;
+ } else {
+ av_log(NULL, AV_LOG_WARNING,
+ "Truncate N syntax in configuration file is deprecated, "
+ "use Truncate alone with no arguments\n");
+ feed->truncate = strtod(arg, NULL);
+ }
}
} else if (!av_strcasecmp(cmd, "FileMaxSize")) {
if (feed) {