aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/avstring.c
Commit message (Collapse)AuthorAgeFilesLines
* avutil/avstring: improve av_strreplace implementSteven Liu2017-04-111-65/+11
| | | | | | | | Use AVBprint to implement av_strreplace add av_strreplace test case TEST_STRREPLACE Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avutil/avstring: add av_strreplace API into avstringSteven Liu2017-04-011-0/+77
| | | | | | | refer to: http://creativeandcritical.net/str-replace-c add av_strreplace API for replace string operations. Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* Merge commit 'd12b5b2f135aade4099f4b26b0fe678656158c13'Derek Buitenhuis2016-05-111-64/+0
|\ | | | | | | | | | | | | | | * 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>
| * build: Split test programs off into separate filesDiego Biurrun2016-04-071-52/+0
| | | | | | | | | | This avoids spurious library rebuilds when only the test program code is changed and simplifies the build system.
| * avutil/avstring: Inline some tiny functionsHenrik Gramner2015-10-031-22/+0
| | | | | | | | | | | | | | They're short enough that inlining them actually reduces code size due to all the overhead associated with making a function call. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | avutil/parsing: add '\r' as whitespaceMuhammad Faiz2016-05-061-1/+1
| | | | | | | | | | | | | | for compatibility with platforms that treat it as newline Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
* | avutil/avstring: add a "ALL" entry and the possibility to negate matches to ↵Michael Niedermayer2016-02-131-5/+10
| | | | | | | | | | | | | | | | | | | | av_match_name() This will extend the whitelist features to allow blacklisting individual protocols and to explicitly force everything to be enabled. Reviewed-by: Stefano Sabatini <stefasab@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avutil/avstring: Inline some tiny functionsHenrik Gramner2015-09-261-22/+0
| | | | | | | | | | They're short enough that inlining them actually reduces code size due to all the overhead associated with making a function call.
* | avutil/avstring: Do not print NULLMichael Niedermayer2015-06-191-1/+1
| | | | | | | | | | | | | | Fixes segfault Fixes Ticket4452 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avutil/avstring: Fix undefined shiftMichael Niedermayer2015-06-191-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avutil/avstring: Use size_t in av_strlcatf()Michael Niedermayer2015-05-111-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavu/avstring: add av_append_path_component() funcionLukasz Marek2015-03-311-0/+45
| | | | | | | | | | | | Convinient function to build paths. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avutil/avstring: fix hardcoded separator in av_match_list()Michael Niedermayer2014-10-231-4/+4
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avutil/avstring: Reimplement av_match_list()Michael Niedermayer2014-10-231-15/+14
| | | | | | | | | | | | | | av_match_list() is only used for whitelists, fix it so it works with multi-named formats like "mov,mp4,m4a,3gp,3g2,mj2" Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avutil/avstring: Factor av_match_list() outMichael Niedermayer2014-10-021-0/+21
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavu/avstring: check for overlong encodings in av_utf8_decode()Stefano Sabatini2014-09-011-1/+14
| | | | | | | | Fix reopened trac ticket #1163.
* | Merge commit '69e7336b8e16ee65226fc20381baf537f4b125e6'Michael Niedermayer2014-07-291-0/+18
|\| | | | | | | | | | | | | | | | | | | | | | | * commit '69e7336b8e16ee65226fc20381baf537f4b125e6': avstring: Expose the simple name match function Conflicts: libavutil/avstring.c libavutil/avstring.h libavutil/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avstring: Expose the simple name match functionLuca Barbato2014-07-291-0/+20
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
| * avstring-test: Mark pointer passed to av_free() as non-constDiego Biurrun2013-10-231-1/+2
| | | | | | | | libavutil/avstring.c:278:9: warning: passing argument 1 of ‘av_free’ discards ‘const’ qualifier from pointer target type
* | avutil/avstring: do not lose ascii characters when decoding non utf-8 with ↵Michael Niedermayer2014-04-131-4/+4
| | | | | | | | | | | | | | | | av_utf8_decode() Fixes Ticket3363 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avutil/avstring: fix () positionMichael Niedermayer2013-12-111-2/+2
| | | | | | | | | | | | Fixes CID1135751 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavu/avstring: add av_utf8_decode() functionStefano Sabatini2013-11-221-0/+64
| |
* | avutil/avstring: make const tables static constMichael Niedermayer2013-08-111-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '4be368b504c6f4a03051448728fc62cd0ed506b2'Michael Niedermayer2013-03-081-1/+1
|\| | | | | | | | | | | | | | | * commit '4be368b504c6f4a03051448728fc62cd0ed506b2': avstring: Fix isxdigit to not accept non-hex characters configure: Add missing videodsp dependencies to some decoders Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avstring: Fix isxdigit to not accept non-hex charactersMartin Storsjö2013-03-071-1/+1
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'efa7f4202088c70caba11d7834641bc6eaf41830'Michael Niedermayer2013-03-081-0/+22
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'efa7f4202088c70caba11d7834641bc6eaf41830': Use the avstring.h locale-independent character type functions avstring: Add locale independent versions of some ctype.h functions Conflicts: avprobe.c doc/APIchanges libavcodec/dvdsubdec.c libavcodec/utils.c libavutil/avstring.c libavutil/avstring.h libavutil/eval.c libavutil/parseutils.c libavutil/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Use the avstring.h locale-independent character type functionsReimar Döffinger2013-03-071-2/+1
| | | | | | | | | | | | Make sure the behavior does not change with the locale. Signed-off-by: Martin Storsjö <martin@martin.st>
| * avstring: Add locale independent versions of some ctype.h functionsReimar Döffinger2013-03-071-0/+22
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | lavu: add escape APIStefano Sabatini2013-03-071-0/+18
| | | | | | | | | | | | | | | | The escape API will be useful to perform escaping programmatically, which is required when crafting argument strings, and will be used for context printing as well. This is based on the ffescape tool code, with a few extensions and fixes.
* | Remove incorrect use of ctype.h functions.Reimar Döffinger2013-03-031-2/+1
| | | | | | | | | | | | | | 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>
* | avstring: fix "warning: return discards const qualifier from pointer target ↵Michael Niedermayer2013-01-301-2/+2
| | | | | | | | | | | | type" Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'b85a5e87af4254b80913fe33591d96361f30832b'Michael Niedermayer2013-01-251-0/+14
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'b85a5e87af4254b80913fe33591d96361f30832b': lavu: Add av_strnstr() h264: Allow discarding the cropping information from SPS Conflicts: Changelog doc/APIchanges libavcodec/avcodec.h libavcodec/version.h libavutil/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavu: Add av_strnstr()Vladimir Pantelic2013-01-251-0/+14
| | | | | | | | | | | | | | This is a length limited version of strstr() Signed-off-by: Vladimir Pantelic <vladoman@gmail.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | Merge commit '33552a5f7b6ec7057516f487b1a902331f8c353e'Michael Niedermayer2013-01-251-60/+57
|\| | | | | | | | | | | | | | | | | | | | | * commit '33552a5f7b6ec7057516f487b1a902331f8c353e': arm: Add mathops.h to ARCH_HEADERS list avstring: K&R formatting cosmetics Conflicts: libavutil/avstring.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avstring: K&R formatting cosmeticsLuca Barbato2013-01-241-59/+56
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | Merge commit '6dd93ee6f1b050ad7c4b247899e83efa293ee405'Michael Niedermayer2012-12-301-0/+41
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '6dd93ee6f1b050ad7c4b247899e83efa293ee405': hlsenc: check append_entry return value hlsenc: use the basename to generate the list entries avstring: add av_basename and av_dirname Conflicts: Changelog doc/APIchanges libavutil/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avstring: add av_basename and av_dirnameLuca Barbato2012-12-291-0/+41
| | | | | | | | Thread safe version of the common basename and dirname.
* | Merge commit 'cb45553f577f8e0ebfe05d3287e1b6fa5859b967'Michael Niedermayer2012-12-051-1/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'cb45553f577f8e0ebfe05d3287e1b6fa5859b967': Remove pointless #undefs of previously forbidden functions. fate: Add dependencies for bmp, cdxl, dfa, mp3 Conflicts: doc/examples/muxing.c libavfilter/filtfmts.c libavutil/des.c libavutil/eval.c libavutil/log.c libavutil/parseutils.c tests/fate/mp3.mak Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Remove pointless #undefs of previously forbidden functions.Anton Khirnov2012-12-041-1/+0
| |
* | avstring: fix compiler warning about freeing const pointersMichael Niedermayer2012-11-031-1/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'f5962229bfcb14c2879e69ccdf7f1a4934168609'Michael Niedermayer2012-10-131-2/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'f5962229bfcb14c2879e69ccdf7f1a4934168609': avplay: use audio parameters from the decoded frame instead of AVCodecContext dca: allocate a secondary buffer for extra channels when downmixing configure: use utilities from /usr/xpg4/bin if it exists avstring-test: fix memory leaks Conflicts: ffplay.c libavcodec/dcadec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avstring-test: fix memory leaksMans Rullgard2012-10-121-2/+4
| | | | | | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-08-161-0/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-151-0/+2
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-11-071-10/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * avstring: Add locale independent implementations of strcasecmp/strncasecmpReimar Döffinger2011-11-061-0/+21
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
| * Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-191-4/+4
| | | | | | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* | Replace all strcasecmp/strncasecmp usages.Reimar Döffinger2011-11-031-0/+27
| | | | | | | | | | | | | | | | | | | | All current usages of it are incompatible with localization. For example strcasecmp("i", "I") != 0 is possible, but would break many of the places where it is used. Instead use our own implementations that always treat the data as ASCII. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | lavu: add av_strtok()Stefano Sabatini2011-10-181-0/+29
| | | | | | | | | | | | The function strtok_r() is part of the POSIX.1 specification, but is not available on some platforms. We provide an internal implementation, so we do not need to rely on a platform implementation.
* | avstring: fix return discards qualifiers from pointer target type.Michael Niedermayer2011-10-171-2/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>