summaryrefslogtreecommitdiff
path: root/libavutil/opt.c
Commit message (Collapse)AuthorAge
* avutil/opt: Fix type used to access AV_OPT_TYPE_SAMPLE_FMTMichael Niedermayer2015-02-06
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avutil/opt: Fix types used to access AV_OPT_TYPE_PIXEL_FMTMichael Niedermayer2015-02-06
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge commit '07a0c0f0005072d115ace61e60f46be68582cc3a'Michael Niedermayer2015-01-06
|\ | | | | | | | | | | | | * commit '07a0c0f0005072d115ace61e60f46be68582cc3a': opt: check memory allocation Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * opt: check memory allocationVittorio Giovara2015-01-05
| | | | | | | | | | CC: libav-stable@libav.org Bug-Id: CID 1257771
* | Merge commit 'b1306823d0b3ae998c8e10ad832004eb13bdd93e'Michael Niedermayer2014-12-19
|\| | | | | | | | | | | | | | | | | | | | | | | * commit 'b1306823d0b3ae998c8e10ad832004eb13bdd93e': check memory errors from av_strdup() Conflicts: avprobe.c libavformat/matroskaenc.c libavutil/opt.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * check memory errors from av_strdup()Vittorio Giovara2014-12-18
| |
* | avutil/opt: Fix AV_OPT_TYPE_BINARY case in av_opt_is_set_to_default()Michael Niedermayer2014-12-08
| | | | | | | | | | | | | | Fixes CID1257010 Reviewed-by: Lukasz Marek <lukasz.m.luki2@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avutil/opt: Check av_parse_video_rate()s return valueMichael Niedermayer2014-12-07
| | | | | | | | | | | | Fixes CID1257008 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avutil/opt: Check av_parse_color() return valueMichael Niedermayer2014-12-07
| | | | | | | | | | | | Fixes: CID1257007 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavu/opt: add escaping to av_opt_serializeLukasz Marek2014-11-29
| | | | | | | | Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
* | lavu/opt: add consts where possibleLukasz Marek2014-11-27
| |
* | lavu/opt: handle NULL obj in av_opt_nextLukasz Marek2014-11-25
| | | | | | | | | | | | It indirectly also fixes av_opt_free for NULL objs. Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
* | lavu/opt: introduce av_opt_serialize()Lukasz Marek2014-11-16
| | | | | | | | | | | | | | 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>
* | lavu/opt: introduce av_opt_is_set_to_default()Lukasz Marek2014-11-16
| | | | | | | | | | | | New function allows to check if option is set to its default value Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
* | lavu/opt: fix av_opt_get functionLukasz Marek2014-11-12
| | | | | | | | Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
* | lavu/opt: fix memleak in testLukasz Marek2014-11-12
| | | | | | | | Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
* | lavu/opt: update testsLukasz Marek2014-11-11
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | lavu/opt: add support for binary defaultsLukasz Marek2014-11-11
| | | | | | | | Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
* | lavu/opt: check for NULL before parsingLukasz Marek2014-11-11
| | | | | | | | | | | | set_string_binary crashes when called with val==NULL Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
* | lavu/opt: copy dict in av_opt_copyLukasz Marek2014-11-09
| | | | | | | | Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
* | avutil: remove obsolete FF_API_FIND_OPT cruftJames Almer2014-10-05
| | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com>
* | libavutil/opt: fix av_opt_set_channel_layout() to access correct memory addressPhilip DeCamp2014-09-24
| | | | | | | | | | Signed-off-by: Philip DeCamp <decamp@mit.edu> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '4b1f5e5090abed6c618c8ba380cd7d28d140f867'Michael Niedermayer2014-08-15
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '4b1f5e5090abed6c618c8ba380cd7d28d140f867': cosmetics: Write NULL pointer inequality checks more compactly Conflicts: libavcodec/dvdsubdec.c libavcodec/h263dec.c libavcodec/libxvid.c libavcodec/rv10.c libavcodec/utils.c libavformat/format.c libavformat/matroskadec.c libavformat/segment.c libavutil/opt.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * cosmetics: Write NULL pointer inequality checks more compactlyGabriel Dume2014-08-15
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | avutil/opt: remove disabled old ABI compatibility codeMichael Niedermayer2014-08-14
| | | | | | | | | | | | Fixes some unused variable warnings Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'a8c104a511f97e4ea617df73b31737e28a8a5126'Michael Niedermayer2014-08-13
|\| | | | | | | | | | | | | | | | | | | | | | | * commit 'a8c104a511f97e4ea617df73b31737e28a8a5126': AVOption: add support for dictionary types. Conflicts: libavutil/opt.c libavutil/opt.h libavutil/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * AVOption: add support for dictionary types.Andrew Stone2014-08-13
| | | | | | | | | | | | | | 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>
* | avutil/opt: ensure the right buffer is used in set_string_number()Michael Niedermayer2014-07-25
| | | | | | | | | | | | Fixes use of uninitialized memory Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avutil/opt: Fix parsing regression with constants starting with numbersMichael Niedermayer2014-07-23
| | | | | | | | | | | | | | Fixes parsing "3dnow" Found-by: jamrial Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avutil/opt: simplify set_string_number()Michael Niedermayer2014-07-22
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avutil/opt: set_string_number(): remove unneeded copyMuhammad Faiz2014-07-22
| | | | | | | | | | | | also remove unused variables Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avutil/opt: Support general expressions involving AVOption constants in ↵Michael Niedermayer2014-07-21
| | | | | | | | | | | | set_string_number() Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avutil: move QP2LAMBDA constant to evalMichael Niedermayer2014-07-21
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avutil/opt: remove dead code from set_string_number()Michael Niedermayer2014-07-21
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avutil/opt.c: fix bug when parsing optionMuhammad Faiz2014-07-21
| | | | | | | | | | | | | | | | | | | | | | 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>
* | avutil/opt: try to fix the case where src==dst in av_opt_copy()Michael Niedermayer2014-07-17
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avutil/opt: add av_opt_copy()Michael Niedermayer2014-06-01
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avutil/opt: add opt_size()Michael Niedermayer2014-06-01
| | | | | | | | If people want, this could be exported as av_opt_size()
* | lavu/opt: add av_opt_set_dict2() functionLukasz Marek2014-05-02
| | | | | | | | | | | | | | | | 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>
* | lavu/opt: validate range before dereferenceLukasz Marek2014-04-04
| | | | | | | | | | | | | | | | | | 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>
* | lavu/opt: dont crash on freeing NULL AVOptionRangesLukasz Marek2014-04-03
| | | | | | | | | | Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavu/opt: extend AVOptionRange by extra valuesLukasz Marek2014-04-03
| | | | | | | | | | | | | | | | | | 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>
* | avutil/opt: dont crash on av_opt_set_dict() with NULLMichael Niedermayer2014-03-30
| | | | | | | | | | | | | | This allows calling the function without the need to check if the dictionary contains any entries Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avutil/opt: allow max=min=0 for pixel formatsMichael Niedermayer2014-03-01
| | | | | | | | | | | | This is neccessary for maintaining ABI compatibility with FFmpeg 2.1 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'c3ecd968f0e78da6e77f0c06c2f785b266d83cf1'Michael Niedermayer2014-02-20
|\| | | | | | | | | | | | | | | | | | | | | | | * commit 'c3ecd968f0e78da6e77f0c06c2f785b266d83cf1': AVOptions: add flags for read/read-only options Conflicts: libavutil/opt.c libavutil/opt.h libavutil/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * AVOptions: add flags for read/read-only optionsAnton Khirnov2014-02-19
| |
* | avutil/opt: preserve fractions in set_string_number()Michael Niedermayer2014-02-18
| | | | | | | | | | | | This avoids going over a double precission float, which may loose precission Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avutil/opt: Better print representation of number limitsJoão Bernardo2014-01-24
| | | | | | | | | | Signed-off-by: João Bernardo Oliveira <jbvsmo@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavu,lavc,lswr: do not hardcode AV_SAMPLE_FMT_NB value when setting sample ↵Stefano Sabatini2013-12-26
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | lavu,lavfi,lavd: do not hardcode AV_PIX_FMT_NB value when setting pixel ↵Stefano Sabatini2013-12-26
| | | | | | | | | | | | | | | | | | | | | | | | 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.