summaryrefslogtreecommitdiff
path: root/libavutil/opt.c
Commit message (Collapse)AuthorAge
* 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.
* | lavu/opt: apply range checks also when setting format string valueStefano Sabatini2013-12-26
| | | | | | | | | | | | 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.
* | lavu/opt: factorize setting of format values from stringStefano Sabatini2013-12-26
| | | | | | | | Simplify incoming patch.
* | lavu/opt: fix range check logic in set_format()Stefano Sabatini2013-12-26
| | | | | | | | | | In particular, allow to reject undefined values. Previously the code was only accepting values in the range -1 .. NB_FORMATS-1.
* | Merge commit '3bc2e89c76e88ae6f1fd5287e0b11abcfc3c601c'Michael Niedermayer2013-12-16
|\| | | | | | | | | | | | | | | | | | | | | | | | | * commit '3bc2e89c76e88ae6f1fd5287e0b11abcfc3c601c': Bump libavutil major version to account for the LLS API/ABI changes. Conflicts: libavutil/version.h Bump done to stay compatible with libav, its not neccessary otherwise for ffmpeg as we have the new ABI/API under LLS2 and the old (unused) under LLS Merged-by: Michael Niedermayer <michaelni@gmx.at>
* | avutil/opt: Implement av_opt_set_defaults* in O(N) instead of O(N²) timeMichael Niedermayer2013-12-07
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avutil/opt: factor set_string_color() outMichael Niedermayer2013-12-07
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avutil/opt: factor set_string_video_rate() outMichael Niedermayer2013-12-07
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avutil/opt: factor set_string_image_size() outMichael Niedermayer2013-12-07
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avutil/opt: fix flags check on non x86Michael Niedermayer2013-10-29
| | | | | | | | | | | | This should fix several fate failures Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avutil/opt: check flags validity in write_number()Michael Niedermayer2013-10-28
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '0b357a8095e72b092cc5c2aacc2f806db75ecae3'Michael Niedermayer2013-10-28
|\| | | | | | | | | | | | | | | | | | | * commit '0b357a8095e72b092cc5c2aacc2f806db75ecae3': AVOptions: do not range check flag options. Conflicts: libavutil/opt.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * AVOptions: do not range check flag options.Anton Khirnov2013-10-27
| | | | | | | | | | | | | | It does not make sense in the vast majority of use cases, no currently defined AV_OPT_TYPE_FLAGS options in Libav set the range to anything nontrivial, and many of those get it wrong (the "correct" range is INT_MIN to INT_MAX so that the builtin constant "all" works).
* | avutil/opt: initialize retMichael Niedermayer2013-10-20
| | | | | | | | | | | | | | Fixes CID1108610 Fixes use of uninitialized variable Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavu/opt: add AV_OPT_TYPE_CHANNEL_LAYOUT and handler functionsStefano Sabatini2013-10-17
| | | | | | | | | | The new type is compatible with AV_OPT_TYPE_INT64, but allows to specify channel layouts using the format accepted by av_get_channel_layout().
* | lavu/opt-test: use automatic set and free handlersStefano Sabatini2013-10-17
| | | | | | | | | | In particular, do not set default string value by hand and use av_opt_free() to free context.
* | avutil/opt: make const tables static constMichael Niedermayer2013-08-10
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avutil/opt: fix av_log typeMichael Niedermayer2013-08-10
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avutil/opt: fix types passed to the format string "%s"Michael Niedermayer2013-08-08
| | | | | | | | | | | | | | | | Fixes gcc warnings Fixes CID1061056 Fixes CID1061057 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'c7e921a54ffe7feb9f695c82f0a0764ab8d0f62b'Michael Niedermayer2013-08-01
|\| | | | | | | | | | | | | | | | | | | * commit 'c7e921a54ffe7feb9f695c82f0a0764ab8d0f62b': avopt: Check whether the object actually has got an AVClass Conflicts: libavutil/opt.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avopt: Check whether the object actually has got an AVClassMartin Storsjö2013-07-31
| | | | | | | | | | | | | | | | | | | | AVIOContext has got an av_class member that only gets set if opening the context using avio_open2, but not if allocating a custom IO context. A caller that wants to read AVOptions from an AVIOContext (recursively using AV_OPT_SEARCH_CHILDREN) may not know if the AVIOContext actually has got a class set or not. Signed-off-by: Martin Storsjö <martin@martin.st>