mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00:00
ffserver: deprecate inconsistent parsing behavior of Truncate option
Also make it accept the more consistent behavior (boolean option set to true when specified).
This commit is contained in:
parent
0124fca03f
commit
b1049f89fa
1 changed files with 9 additions and 1 deletions
10
ffserver.c
10
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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue