diff options
author | Stefano Sabatini <stefasab@gmail.com> | 2013-11-28 22:47:39 +0100 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2013-11-29 10:28:03 +0100 |
commit | b1049f89fa48ae9b038516a7194686eebaa25be7 (patch) | |
tree | 594fe1fbfc5c44344e09897de5875dba6b91c153 /ffserver.c | |
parent | 0124fca03fb34567055fd4cea32250a5138e5423 (diff) | |
download | ffmpeg-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).
Diffstat (limited to 'ffserver.c')
-rw-r--r-- | ffserver.c | 10 |
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) { |