summaryrefslogtreecommitdiff
path: root/libavutil/dict.c
Commit message (Collapse)AuthorAge
* avformat: factorize iso 8601 timestamp writer to a dictionary avutil functionMarton Balint2016-08-17
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* Merge commit 'd12b5b2f135aade4099f4b26b0fe678656158c13'Derek Buitenhuis2016-05-11
|\ | | | | | | | | | | | | | | * commit 'd12b5b2f135aade4099f4b26b0fe678656158c13': build: Split test programs off into separate files Some conversions done by: James Almer <jamrial@gmail.com> Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | lavu/dict: Add new flag to allow multiple equal keys.Thilo Borgmann2016-03-25
| |
* | avutil/dict: do not realloc entries when deleting a non-existing itemMarton Balint2016-03-15
| | | | | | | | | | | | | | | | Deleting a non-existing item should not invalidate existing entries returned with av_dict_get. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Marton Balint <cus@passwd.hu>
* | Merge commit '11c5f438ff83da5040e85bfa6299f56b321d32ef'Hendrik Leppkes2015-10-14
|\| | | | | | | | | | | | | * commit '11c5f438ff83da5040e85bfa6299f56b321d32ef': dict: Change return type of av_dict_copy() Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * dict: Change return type of av_dict_copy()Vittorio Giovara2015-10-12
| | | | | | | | | | | | av_dict_set() could return an error, so forward it appropriately. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
| * lavu: Check av_dict_set allocationsLuca Barbato2015-01-29
| | | | | | | | | | Bug-Id: CID 1257772 Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | avutil/dict: Use size_t for appending stringsMichael Niedermayer2015-05-10
| | | | | | | | | | | | the string length is not constrained to INT_MAX Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavu/dict: add more testsLukasz Marek2015-04-02
| | | | | | | | Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
* | lavu/dict: fix set function when reuse existing key pointerLukasz Marek2015-04-02
| | | | | | | | | | | | | | | | | | | | Fixes following scenario: av_dict_set(&d, "key", "old", 0); AVDictionaryEentry *e = av_dict_get(d, "key", NULL, 0); av_dict_set(&d, e->key, "new", 0); Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
* | lavu/dict: don't accept AV_DICT_DONT_STRDUP_VAL for av_dict_set_intLukasz Marek2015-04-02
| | | | | | | | | | Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avutil/dict: Use av_freep() to avoid leaving stale pointers in memoryMichael Niedermayer2014-12-27
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavu/dict: check for malloc failureswm42014-12-12
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avutil: remove FF_CONST_AVUTIL53, its no longer neededMichael Niedermayer2014-11-24
| | | | | | | | | | | | version is 54 already Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavu/dict: add av_dict_get_stringLukasz Marek2014-11-21
| | | | | | | | Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
* | Fix "passing argument 1 of av_free discards const qualifier from pointer ↵Michael Niedermayer2014-09-13
| | | | | | | | | | | | target type" Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | dict.c: Free non-strduped av_dict_set arguments on error.Reimar Döffinger2014-08-23
| | | | | | | | | | | | | | | | | | | | Unfortunately this was not explicitly documented and thus might be risky. But all uses I could find in FFmpeg and one in VLC had a memleak in these cases, and I could not find any that relied on the previous behaviour. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | dict.c: empty dictionaries should be a NULL pointer.Reimar Döffinger2014-08-16
| | | | | | | | | | | | | | Ensure this is even the case if they are empty because we failed adding the first entry. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | dict.c: Add av_dict_set_int helper function.Reimar Döffinger2014-08-16
| | | | | | | | | | | | | | This allows getting rid of the many, slightly differing, implementations of basically the same thing. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | dict.c: minor simplification.Reimar Döffinger2014-07-31
| | | | | | | | Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | Merge commit '1619274fb393f55a365cc10f88faa173c9a8e772'Michael Niedermayer2014-06-09
|\| | | | | | | | | | | | | * commit '1619274fb393f55a365cc10f88faa173c9a8e772': av_dict_set: fix potential memory leak with AV_DICT_DONT_OVERWRITE Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * av_dict_set: fix potential memory leak with AV_DICT_DONT_OVERWRITEJanne Grunau2014-06-09
| | | | | | | | | | av_dict_set leaks it key/value arguments if AV_DICT_DONT_OVERWRITE is combined with AV_DICT_DONT_STRDUP_{KEY,VAL} and the key exists.
| * dict: const correctness for av_dict_get() and av_dict_copy()Diego Biurrun2014-06-05
| |
* | avutil/dict: delay addition of const from ↵Michael Niedermayer2014-05-14
| | | | | | | | | | | | | | | | e12a73246d8ce7d0fc4036522688934e26de4bb1 until next major ABI bump This unbreaks API Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | dict: const pointers to dictionary where possibleRoman Fietze2014-04-03
| | | | | | | | | | | | | | | | | | | | This avoids temporaries or ugly casting in the calling code where const dictionaries are used. Esp. helpful when writing C++ wrappers for an AVDictionary having const member functions and CTORs with const references. Signed-off-by: Roman Fietze <roman.fietze@telemotive.de> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '93d216d37a3f95190ecb9d51cf72f54ea4e04ec7'Michael Niedermayer2014-03-07
|\| | | | | | | | | | | | | | | | | | | * commit '93d216d37a3f95190ecb9d51cf72f54ea4e04ec7': dict: K&R formatting cosmetics Conflicts: libavutil/dict.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dict: K&R formatting cosmeticsPatrice Clement2014-03-07
| |
| * Use the avstring.h locale-independent character type functionsReimar Döffinger2013-03-07
| | | | | | | | | | | | Make sure the behavior does not change with the locale. Signed-off-by: Martin Storsjö <martin@martin.st>
* | lavu/dict: cosmetic realign.Clément Bœsch2013-04-13
| |
* | Remove incorrect use of ctype.h functions.Reimar Döffinger2013-03-03
| | | | | | | | | | | | | | As far as I can tell the code should not change behaviour depending on locale in any of these places. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | dict: fix memleakMichael Niedermayer2013-02-01
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | dict.c: use av_mallocz instead of av_reallocPaweł Hajdan, Jr2013-01-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Memory passed to av_realloc must come from malloc, calloc or realloc, and not e.g. memalign. realloc(3): The realloc() function changes the size of the memory block pointed to by ptr to size bytes. (...) Unless ptr is NULL, it must have been returned by an earlier call to malloc(), calloc() or realloc(). The issue has been found by debugallocation, a part of google-perftools: http://code.google.com/p/gperftools/ . This makes fate pass when using LD_PRELOAD-ed debugallocation. See also earlier discussion http://ffmpeg.org/pipermail/ffmpeg-devel/2013-January/137234.html Signed-off-by: Paweł Hajdan, Jr <phajdan@google.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '38c1466ca41c73c7ce347da702362cb69c151716'Michael Niedermayer2013-01-26
|\| | | | | | | | | | | | | | | | | | | | | | | * commit '38c1466ca41c73c7ce347da702362cb69c151716': dict: add av_dict_parse_string() doc: support multitable in texi2pod Conflicts: doc/APIchanges libavutil/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dict: add av_dict_parse_string()Justin Ruggles2013-01-25
| | | | | | | | | | | | Can be used to set multiple key/value pairs from a string. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-08-16
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: Fix even more missing includes after the common.h removal build: Factor out rangecoder dependencies to CONFIG_RANGECODER build: Factor out error resilience dependencies to CONFIG_ERROR_RESILIENCE x86: avcodec: Consistently name all init files Add more missing includes after removing the implicit common.h Add some more missing includes after removing the implicit common.h Don't include common.h from avutil.h rtmp: Automatically compute the hash for SWFVerification Conflicts: configure doc/APIchanges doc/examples/decoding_encoding.c libavcodec/Makefile libavcodec/assdec.c libavcodec/audio_frame_queue.c libavcodec/avpacket.c libavcodec/dv_profile.c libavcodec/dwt.c libavcodec/libtheoraenc.c libavcodec/rawdec.c libavcodec/rv40dsp.c libavcodec/tiff.c libavcodec/tiffenc.c libavcodec/v210dec.h libavcodec/vc1dsp.c libavcodec/x86/Makefile libavfilter/asrc_anullsrc.c libavfilter/avfilter.c libavfilter/buffer.c libavfilter/formats.c libavfilter/vf_ass.c libavfilter/vf_drawtext.c libavfilter/vf_fade.c libavfilter/vf_select.c libavfilter/video.c libavfilter/vsrc_testsrc.c libavformat/version.h libavutil/audioconvert.c libavutil/error.h libavutil/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Don't include common.h from avutil.hMartin Storsjö2012-08-15
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-08-11
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: lavf: simplify is_intra_only() by using codec descriptors. lavc: add an intra-only codec property. lavc: add codec descriptors. lavc: fix mixing CODEC_ID/AV_CODEC_ID in C++ code. dict: move struct AVDictionary definition to dict.c dict: add av_dict_count() Conflicts: doc/APIchanges libavcodec/old_codec_ids.h libavformat/utils.c libavutil/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dict: move struct AVDictionary definition to dict.cMans Rullgard2012-08-10
| | | | | | | | | | | | | | This makes struct AVDictionary fully opaque now that nothing needs to access it directly any more. Signed-off-by: Mans Rullgard <mans@mansr.com>
| * dict: add av_dict_count()Mans Rullgard2012-08-10
| | | | | | | | | | | | | | | | This adds a function to retrieve the number of entries in a dictionary and updates the places directly accessing what should be an opaque struct to use this new function instead. Signed-off-by: Mans Rullgard <mans@mansr.com>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-11-07
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (23 commits) x86inc: use sse versions of common macros instead of sse2 when applicable doc/APIchanges: add missing dates and hashes lavf: don't return from void av_update_cur_dts() Changelog: add more entries. Changelog: update ffmpeg/avconv incompatibility list. avconv: remove some redundant temporary variables. avconv: fix broken indentation avconv: move copy_initial_nonkeyframes to the options context. avconv: use file:stream instead of file.stream in log messages. doc/avconv: elaborate on basic functionality. doc/avconv: -sample_fmts, not -help sample_fmts prints the sample formats openssl: Only use CRYPTO_set_id_callback on OpenSSL < 1.0.0 Call avformat_network_init/deinit in the programs Remove leftover includes of strings.h avutil: Don't allow using strcasecmp/strncasecmp Replace all usage of strcasecmp/strncasecmp avstring: Add locale independent implementations of strcasecmp/strncasecmp avstring: Add locale independent implementations of toupper/tolower cosmetics: insert some spaces in explicit enum value assignments move 8SVX audio codecs to the audio codec list part on the next bump ... Conflicts: avprobe.c doc/APIchanges ffplay.c ffserver.c libavcodec/avcodec.h libavdevice/bktr.c libavdevice/v4l.c libavdevice/v4l2.c libavformat/matroskaenc.c libavformat/wtv.c libavutil/avstring.c libavutil/avstring.h libavutil/avutil.h libswscale/x86/swscale_template.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Remove leftover includes of strings.hMartin Storsjö2011-11-06
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | dict: fix assignment discards qualifiers from pointer target type warnings.Michael Niedermayer2011-10-17
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-06-18
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: lavc: add opt_find to AVCodecContext class. h264: Complexify frame num gap shortening code intreadwrite.h: fix AV_RL32/AV_RB32 signedness. Fix decoding of mpegts streams with h264 video that does *NOT* have b frames Add minor bumps and APIChanges entries for lavf private options. ffmpeg: deprecate -vc and -tvstd ffmpeg: use new avformat_open_* API. ffserver: use new avformat_open_* API. ffprobe: use new avformat_open_* API. ffplay: use new avformat_open_* API. cmdutils: add opt_default2(). dict: add AV_DICT_APPEND flag. lavf: add avformat_write_header() as a replacement for av_write_header(). Deprecate av_open_input_* and remove their uses. lavf: add avformat_open_input() as a replacement for av_open_input_* AVOptions: add av_opt_find() as a replacement for av_find_opt. AVOptions: add av_opt_set_dict() mapping a dictionary struct to a context. ffmpeg: don't abuse a global for passing frame size from input to output ffmpeg: don't abuse a global for passing pixel format from input to output ffmpeg: initialise encoders earlier. Conflicts: cmdutils.c doc/APIchanges ffmpeg.c ffplay.c ffprobe.c libavcodec/h264.c libavformat/avformat.h libavformat/utils.c libavformat/version.h libavutil/avutil.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dict: add AV_DICT_APPEND flag.Anton Khirnov2011-06-16
| |
* | dict: This code was developed in ffmpeg and not libav, nor by libav developers.Michael Niedermayer2011-06-10
|/ | | | | | Correct copyright notices. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Move metadata API from lavf to lavu.Anton Khirnov2011-06-08
Rename it to AVDictionary, since it will be used as such. Tags documentation and metadata conversion API is lavf-specific, so remains there.