mirror of
				https://github.com/nyanmisaka/ffmpeg-rockchip.git
				synced 2025-10-27 02:41:54 +08: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:
		| @@ -4232,8 +4232,16 @@ static int parse_ffconfig(const char *filename) | |||||||
|         } else if (!av_strcasecmp(cmd, "Truncate")) { |         } else if (!av_strcasecmp(cmd, "Truncate")) { | ||||||
|             if (feed) { |             if (feed) { | ||||||
|                 get_arg(arg, sizeof(arg), &p); |                 get_arg(arg, sizeof(arg), &p); | ||||||
|  |                 /* 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); |                     feed->truncate = strtod(arg, NULL); | ||||||
|                 } |                 } | ||||||
|  |             } | ||||||
|         } else if (!av_strcasecmp(cmd, "FileMaxSize")) { |         } else if (!av_strcasecmp(cmd, "FileMaxSize")) { | ||||||
|             if (feed) { |             if (feed) { | ||||||
|                 char *p1; |                 char *p1; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Stefano Sabatini
					Stefano Sabatini