cd01b3cbcf 
								
							
								 
							
						 
						
							
							
								
								lavu/opt: Use "&&" instead of "*" in boolean expression.  
							
							Fixes the following warning:
libavutil/opt.c:101:47: warning: '*' in boolean context, suggest '&&' instead 
							
						 
						8 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								3ab8436ff6 
								
							
								 
							
						 
						
							
							
								
								opt: reject denominator zero as out of range  
							
							Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> 
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								2f935baa7d 
								
							
								 
							
						 
						
							
							
								
								avutil/opt: Add AV_OPT_TYPE_UINT64  
							
							Requested-by: wm4 ([FFmpeg-devel] [PATCH] avutil/opt: Support max > INT64_MAX in write_number() with AV_OPT_TYPE_INT64)
Requested-by: ronald ([FFmpeg-devel] [PATCH] avutil/opt: Support max > INT64_MAX in write_number() with AV_OPT_TYPE_INT64)
Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> 
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								748ce9d702 
								
							
								 
							
						 
						
							
							
								
								avutil/opt: Fix setting int64 to its maximum  
							
							Found-by: Andreas
Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> 
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								67351924fa 
								
							
								 
							
						 
						
							
							
								
								Drop unreachable break and return statements  
							
							
								
							
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								37bb600405 
								
							
								 
							
						 
						
							
							
								
								avutil/opt: Fix max/min checking in av_opt_set() for AV_OPT_TYPE_VIDEO_RATE  
							
							Fixes Ticket5618
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> 
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								1a3cff4f7e 
								
							
								 
							
						 
						
							
							
								
								libavutil/opt: add writing AV_OPT_TYPE_VIDEO_RATE AVOption  
							
							Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> 
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								83065939cb 
								
							
								 
							
						 
						
							
							
								
								avutil/parsing: add '\r' as whitespace  
							
							for compatibility with platforms that treat it
as newline
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com> 
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								d12b5b2f13 
								
							
								 
							
						 
						
							
							
								
								build: Split test programs off into separate files  
							
							This avoids spurious library rebuilds when only the test program
code is changed and simplifies the build system. 
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								3b08d9d932 
								
							
								 
							
						 
						
							
							
								
								testprogs: K&R formatting cosmetics  
							
							
								
							
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								564b4591bb 
								
							
								 
							
						 
						
							
							
								
								opt: Add av_opt_copy()  
							
							This includes documentation and other modifications by
Lukasz Marek and Martin Storsjö.
Signed-off-by: Martin Storsjö <martin@martin.st> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								8833f1508b 
								
							
								 
							
						 
						
							
							
								
								opt: Add const to av_opt_next  
							
							Also add const to pointers in static functions within opt.c where
possible/necessary.
Signed-off-by: Martin Storsjö <martin@martin.st> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								0d2fcdb1c5 
								
							
								 
							
						 
						
							
							
								
								opt-test: Merge struct declaration and initialization  
							
							
								
							
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								d3044cf37f 
								
							
								 
							
						 
						
							
							
								
								opt-test: Move some variable declarations to avoid block braces  
							
							
								
							
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								f3ace85d88 
								
							
								 
							
						 
						
							
							
								
								avutil/opt: check for and handle errors in av_opt_set_dict2()  
							
							Previously errors could result in random entries to be lost.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> 
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								47ea04ff10 
								
							
								 
							
						 
						
							
							
								
								lavu/opt: enhance printing durations.  
							
							Trim unneeded leading components and trailing zeros.
Move the formating code in a separate function.
Use the function also to format the default value, it was currently
printed as plain integer, inconsistent to the way it is parsed. 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								6b5412cbfa 
								
							
								 
							
						 
						
							
							
								
								avutil/opt: print more meaningful default flags values  
							
							Example:
% ./ffmpeg -h encoder=gif
[...]
GIF encoder AVOptions:
  -gifflags          <flags>      E..V.... set GIF flags (default offsetting+transdiff)
     offsetting                   E..V.... enable picture offsetting
     transdiff                    E..V.... enable transparency detection between frames 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								ce0a117ed4 
								
							
								 
							
						 
						
							
							
								
								avutil/opt: display a better default value for int/int64 options  
							
							Example:
% ./ffmpeg -h encoder=aac
  -aac_coder         <int>        E...A... Coding algorithm (from -1 to 3) (default twoloop)
     faac                         E...A... FAAC-inspired method
     anmr                         E...A... ANMR method
     twoloop                      E...A... Two loop searching method
     fast                         E...A... Constant quantizer
[...] 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								0562f95902 
								
							
								 
							
						 
						
							
							
								
								lavu/opt: add flag to return NULL when applicable in av_opt_get  
							
							Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								9571a56009 
								
							
								 
							
						 
						
							
							
								
								avutil/opt: refactor pixel/sample fmt common case  
							
							
								
							
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								9117748cff 
								
							
								 
							
						 
						
							
							
								
								avutil/opt: add AV_OPT_TYPE_BOOL  
							
							
								
							
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								d83dd630a0 
								
							
								 
							
						 
						
							
							
								
								lavu: Drop FF_API_GET_CHANNEL_LAYOUT_COMPAT cruft  
							
							FATE refs changed to accomodate for the new default behavior of the function.
Numbers are now interpreted as a channel layout, instead of a number of channels. 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								237cf3786e 
								
							
								 
							
						 
						
							
							
								
								lavu: Drop old deprecated AVOption API  
							
							Deprecated in 2011/10 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								545559e43d 
								
							
								 
							
						 
						
							
							
								
								Remove FF_CONST_AVUTIL55 cruft  
							
							
								
							
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								3285005347 
								
							
								 
							
						 
						
							
							
								
								Undeprecate av_opt_set_defaults2().  
							
							
								
							
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								52835cb8e1 
								
							
								 
							
						 
						
							
							
								
								avutil/opt: Avoid division by 0  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								6d7e57e88b 
								
							
								 
							
						 
						
							
							
								
								avutil/opt: Do not print inf in selftest  
							
							This fixes fate failures on windows
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								88ec5435bb 
								
							
								 
							
						 
						
							
							
								
								avutil/opt: also test av_opt_show2()  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								e9c85ae648 
								
							
								 
							
						 
						
							
							
								
								avutil/opt: Remove odd trailing whitespace bytes from flags help description  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								c1e93cdc9e 
								
							
								 
							
						 
						
							
							
								
								avutil/opt: Also test/compare the av_log output i the selftest  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								1750b45cdf 
								
							
								 
							
						 
						
							
							
								
								avutil/opt: Fix type used to access AV_OPT_TYPE_SAMPLE_FMT  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								a0640e6346 
								
							
								 
							
						 
						
							
							
								
								avutil/opt: Fix types used to access AV_OPT_TYPE_PIXEL_FMT  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								07a0c0f000 
								
							
								 
							
						 
						
							
							
								
								opt: check memory allocation  
							
							CC: libav-stable@libav.org 
Bug-Id: CID 1257771 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								b1306823d0 
								
							
								 
							
						 
						
							
							
								
								check memory errors from av_strdup()  
							
							
								
							
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								41a52740d4 
								
							
								 
							
						 
						
							
							
								
								avutil/opt: Fix AV_OPT_TYPE_BINARY case in av_opt_is_set_to_default()  
							
							Fixes CID1257010
Reviewed-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								ace9161655 
								
							
								 
							
						 
						
							
							
								
								avutil/opt: Check av_parse_video_rate()s return value  
							
							Fixes CID1257008
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								eb74839caa 
								
							
								 
							
						 
						
							
							
								
								avutil/opt: Check av_parse_color() return value  
							
							Fixes: CID1257007
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								0cb994dfe3 
								
							
								 
							
						 
						
							
							
								
								lavu/opt: add escaping to av_opt_serialize  
							
							Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								f00e9c4b10 
								
							
								 
							
						 
						
							
							
								
								lavu/opt: add consts where possible  
							
							
								
							
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								ea0d893817 
								
							
								 
							
						 
						
							
							
								
								lavu/opt: handle NULL obj in av_opt_next  
							
							It indirectly also fixes av_opt_free for NULL objs.
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								bee5844ddd 
								
							
								 
							
						 
						
							
							
								
								lavu/opt: introduce av_opt_serialize()  
							
							Function allows to create string containing object's serialized options.
Such string may be passed back to av_set_options_string() in order to restore options.
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								eec693328a 
								
							
								 
							
						 
						
							
							
								
								lavu/opt: introduce av_opt_is_set_to_default()  
							
							New function allows to check if option is set to its default value
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								173d51c982 
								
							
								 
							
						 
						
							
							
								
								lavu/opt: fix av_opt_get function  
							
							Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								5dc0f607e7 
								
							
								 
							
						 
						
							
							
								
								lavu/opt: fix memleak in test  
							
							Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								b54effba4f 
								
							
								 
							
						 
						
							
							
								
								lavu/opt: update tests  
							
							In general this commit prepares opt tests to be added to fate.
The commit set some non-zero defaults for test options.
It allows to check if defaults are really set.
Added printing of default values.
Added more cases for testing av_set_options_string
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								4efc79649b 
								
							
								 
							
						 
						
							
							
								
								lavu/opt: add support for binary defaults  
							
							Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								bb60142f56 
								
							
								 
							
						 
						
							
							
								
								lavu/opt: check for NULL before parsing  
							
							set_string_binary crashes when called with val==NULL
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								4e179436b6 
								
							
								 
							
						 
						
							
							
								
								lavu/opt: copy dict in av_opt_copy  
							
							Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								71718de814 
								
							
								 
							
						 
						
							
							
								
								avutil: remove obsolete FF_API_FIND_OPT cruft  
							
							Signed-off-by: James Almer <jamrial@gmail.com> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								857fc0a71f 
								
							
								 
							
						 
						
							
							
								
								libavutil/opt: fix av_opt_set_channel_layout() to access correct memory address  
							
							Signed-off-by: Philip DeCamp <decamp@mit.edu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago