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  
				
					
						
							
							
								 
						
							
							
							
								
							
								4b1f5e5090 
								
							
								 
							
						 
						
							
							
								
								cosmetics: Write NULL pointer inequality checks more compactly  
							
							Signed-off-by: Diego Biurrun <diego@biurrun.de> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								8b6cbc3c33 
								
							
								 
							
						 
						
							
							
								
								avutil/opt: remove disabled old ABI compatibility code  
							
							Fixes some unused variable warnings
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								a8c104a511 
								
							
								 
							
						 
						
							
							
								
								AVOption: add support for dictionary types.  
							
							In order to support metadata being set as an option, it's necessary to be able
to set dictionaries as values.
Signed-off-by: Anton Khirnov <anton@khirnov.net> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								24327706e1 
								
							
								 
							
						 
						
							
							
								
								avutil/opt: ensure the right buffer is used in set_string_number()  
							
							Fixes use of uninitialized memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								bbc5adfb94 
								
							
								 
							
						 
						
							
							
								
								avutil/opt: Fix parsing regression with constants starting with numbers  
							
							Fixes parsing "3dnow"
Found-by: jamrial
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								539e72727f 
								
							
								 
							
						 
						
							
							
								
								avutil/opt: simplify set_string_number()  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								4852a88dfb 
								
							
								 
							
						 
						
							
							
								
								avutil/opt: set_string_number(): remove unneeded copy  
							
							also remove unused variables
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								265dadbe7d 
								
							
								 
							
						 
						
							
							
								
								avutil/opt: Support general expressions involving AVOption constants in set_string_number()  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								88efc013b1 
								
							
								 
							
						 
						
							
							
								
								avutil: move QP2LAMBDA constant to eval  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								2c5c7f1089 
								
							
								 
							
						 
						
							
							
								
								avutil/opt: remove dead code from set_string_number()  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								4927c0a988 
								
							
								 
							
						 
						
							
							
								
								avutil/opt.c: fix bug when parsing option  
							
							fix these strange behavior:
-af flanger=delay=10 [OK]
-af flanger=delay=1e1 [OK]
-af flanger=delay=1e+1 [Error]
-af flanger=delay=0.1 [OK]
-af flanger=delay=1e-1 [Error]
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								7cd6d61da5 
								
							
								 
							
						 
						
							
							
								
								avutil/opt: try to fix the case where src==dst in av_opt_copy()  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								00759d71a2 
								
							
								 
							
						 
						
							
							
								
								avutil/opt: add av_opt_copy()  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								f028b7af7b 
								
							
								 
							
						 
						
							
							
								
								avutil/opt: add opt_size()  
							
							If people want, this could be exported as av_opt_size() 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								ba52fb11dc 
								
							
								 
							
						 
						
							
							
								
								lavu/opt: add av_opt_set_dict2() function  
							
							Existing av_opt_set_dict doesn't accept flags.
It doesn't allow to pass options to nested structs.
New function alllows that.
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								3aac5fcfa9 
								
							
								 
							
						 
						
							
							
								
								lavu/opt: validate range before dereference  
							
							This change make error handling simplier.
av_opt_freep_ranges may be called when some ranges are NULL,
for example after memory allocation fail.
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								8c27292373 
								
							
								 
							
						 
						
							
							
								
								lavu/opt: dont crash on freeing NULL AVOptionRanges  
							
							Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								eaed4da96a 
								
							
								 
							
						 
						
							
							
								
								lavu/opt: extend AVOptionRange by extra values  
							
							AVOptionRange is not flexible enough to store AV_OPT_TYPE_IMAGE_SIZE
ranges. Current implementation can only store pixel count.
This patch aims to keep backward compatibility and extend
AVOptionRange with possibility to store width/height ranges.
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								d9a3501c33 
								
							
								 
							
						 
						
							
							
								
								avutil/opt: dont crash on av_opt_set_dict() with NULL  
							
							This allows calling the function without the need to check if the
dictionary contains any entries
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								52d928daf9 
								
							
								 
							
						 
						
							
							
								
								avutil/opt: allow max=min=0 for pixel formats  
							
							This is neccessary for maintaining ABI compatibility with FFmpeg 2.1
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								c3ecd968f0 
								
							
								 
							
						 
						
							
							
								
								AVOptions: add flags for read/read-only options  
							
							
								
							
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								8f853159f6 
								
							
								 
							
						 
						
							
							
								
								avutil/opt: preserve fractions in set_string_number()  
							
							This avoids going over a double precission float, which may loose precission
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								290326711b 
								
							
								 
							
						 
						
							
							
								
								avutil/opt: Better print representation of number limits  
							
							Signed-off-by: João Bernardo Oliveira <jbvsmo@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								334e2e2363 
								
							
								 
							
						 
						
							
							
								
								lavu,lavc,lswr: do not hardcode AV_SAMPLE_FMT_NB value when setting sample format max value  
							
							The constant may change in libavutil but the library may be compiled
against an older version, thus rejecting a value which is otherwise
supported by the new libavutil.
INT_MAX is used here to denote the max allowed value for a sample format.
The opt-test code is changed to provide a valid reference example. 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								3b8c7da7a3 
								
							
								 
							
						 
						
							
							
								
								lavu,lavfi,lavd: do not hardcode AV_PIX_FMT_NB value when setting pixel format max value  
							
							The constant may change in libavutil but the library may be compiled
against an older version, thus rejecting a value which is otherwise
supported by the new libavutil.
INT_MAX is used here to denote the max allowed value for a pixel format.
The opt-test code is changed to provide a valid reference example. 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								55f046be11 
								
							
								 
							
						 
						
							
							
								
								lavu/opt: apply range checks also when setting format string value  
							
							Previously when setting a pixel/sample format as a string range checks
were not performed. This is consistent with the
av_opt_set_pixel/sample_fmt() interface. 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								1575a96b3a 
								
							
								 
							
						 
						
							
							
								
								lavu/opt: factorize setting of format values from string  
							
							Simplify incoming patch. 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								e2b54464c6 
								
							
								 
							
						 
						
							
							
								
								lavu/opt: fix range check logic in set_format()  
							
							In particular, allow to reject undefined values. Previously the code
was only accepting values in the range -1 .. NB_FORMATS-1. 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								e8ac905dae 
								
							
								 
							
						 
						
							
							
								
								avutil/opt: Implement av_opt_set_defaults* in O(N) instead of O(N²) time  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								0aedf90e62 
								
							
								 
							
						 
						
							
							
								
								avutil/opt: factor set_string_color() out  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago