summaryrefslogtreecommitdiffstats
path: root/libavutil/parseutils.c
Commit message (Collapse)AuthorAgeFilesLines
* lavu/parseutils: Allow to parse >= 100 hours.Carl Eugen Hoyos2019-02-091-1/+1
| | | | | Reported and tested by gamnark. Fixes ticket #7721.
* avutil/parseutils: fix some overflows in duration calculationsMarton Balint2018-10-071-4/+10
| | | | | | Also properly return AVERROR(ERANGE) in case of actual overflows. Signed-off-by: Marton Balint <cus@passwd.hu>
* avutil/parseutils: only accept full us duration, do not accept mss durationMarton Balint2018-03-091-4/+3
| | | | | | | | Accepting 'u' suffix for a time specification is neither intuitive nor consistent (now that we don't accept m). Also there was a bug in the code accepting an extra 's' even after 'ms'. Signed-off-by: Marton Balint <cus@passwd.hu>
* parseutils: accept only full "ms" suffixRostislav Pehlivanov2018-03-051-2/+2
| | | | | | | | The commit which added those was pushed prematurely before anyone could object to illogical suffixes like just m for milliseconds. Without this, we'd be locked into never being able to implement the "m" suffix for minutes. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* parseutils: add support for ms and us suffix for AV_OPT_TYPE_DURATIONAurelien Jacobs2018-03-021-2/+13
| | | | | | | supported suffixes are: - s: seconds (default when no suffix specified) - m or ms: milliseconds - u or us: microseconds
* add locale month names to av_small_strptimeMicah Galizia2017-02-261-0/+28
| | | | | Signed-off-by: Micah Galizia <micahgalizia@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil/parseutils: dont assume standard time when parsing a timestampMarton Balint2016-07-111-0/+1
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Marton Balint <cus@passwd.hu>
* Merge commit 'd12b5b2f135aade4099f4b26b0fe678656158c13'Derek Buitenhuis2016-05-111-237/+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-95/+0
| | | | | | | | | | This avoids spurious library rebuilds when only the test program code is changed and simplifies the build system.
| * parseutils-test: Move some variable declarations to avoid block bracesDiego Biurrun2016-03-231-84/+80
| |
* | avutil/parseutils: mark args as static constMichael Niedermayer2016-03-241-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Added more tests to libavutil/parseutils.cPetru Rares Sincraian2016-03-241-0/+36
| | | | | | | | | | | | | | - Added tests for av_find_info_tag(). - Added test for av_get_known_color_name() Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Refactor libavutil/parseutils.cPetru Rares Sincraian2016-03-241-163/+175
| | | | | | | | | | | | | | | | | | | | All tests were in the main method which produces a long main. Now, each test is in his own method. I think this produces a more clear code and follows more with the main priority of FFmpeg "simplicity and small code size" Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avutil/parseutils: remove 2112 date from fate testMarton Balint2016-02-141-1/+1
| | | | | | | | | | | | It is not supported on 32bit. Signed-off-by: Marton Balint <cus@passwd.hu>
* | avutil/parseutils: accept everything in av_parse_time that ↵Marton Balint2016-02-141-2/+30
| | | | | | | | | | | | | | | | ff_iso8601_to_unix_time accepts Also parse timezone information previously ignored in ff_iso8601_to_unix_time. Signed-off-by: Marton Balint <cus@passwd.hu>
* | avutil/parseutils: use microsecond precision when parsing "now" in ↵Marton Balint2016-02-141-5/+7
| | | | | | | | | | | | | | | | av_parse_time() Use av_gettime() instead of time(0) for querying current time. Signed-off-by: Marton Balint <cus@passwd.hu>
* | Merge commit '219b39a71a5694b1c14a07b86477f665a5b6849b'Michael Niedermayer2015-07-211-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | * commit '219b39a71a5694b1c14a07b86477f665a5b6849b': parseutil: Use non ambiguous aliases for uhd Conflicts: doc/ffmpeg.texi libavutil/parseutils.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
| * parseutil: Use non ambiguous aliases for uhdLuca Barbato2015-07-211-2/+2
| | | | | | | | uhd1 and uhd2 would be ambigous.
* | Merge commit 'e93ca480c91397f82f2ea5b6a8b82ac6d0e2bfd2'Michael Niedermayer2015-07-201-0/+4
|\ \ | |/ | | | | | | | | | | | | | | | | | | * commit 'e93ca480c91397f82f2ea5b6a8b82ac6d0e2bfd2': parseutil: Add more resolution aliases Conflicts: doc/ffmpeg.texi libavutil/parseutils.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
| * parseutil: Add more resolution aliasesLuca Barbato2015-07-201-0/+4
| | | | | | | | Add DCI 2k and 4k and uhd1 and uhd2.
| * parseutils: Make av_small_strptime publicLuca Barbato2015-04-071-5/+5
| | | | | | | | | | | | And use it in libavformat. Based on a similar patch by Stefano Sabatini <stefasab@gmail.com>.
* | Merge commit '108f2f381acb93827fb4add0517eeae859afa3bf'Michael Niedermayer2015-04-071-56/+59
|\ \ | |/ | | | | | | | | | | | | | | | | * commit '108f2f381acb93827fb4add0517eeae859afa3bf': parseutils: Extend small_strptime to be used in avformat Conflicts: libavutil/parseutils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * parseutils: Extend small_strptime to be used in avformatLuca Barbato2015-04-061-50/+58
| | | | | | | | The strptime implementation is supposed to support whitespace and %T.
* | Merge commit 'bf704132a51f5d838365158331d4e535e1df4c8e'Michael Niedermayer2015-02-141-3/+3
|\ \ | |/ | | | | | | | | | | | | | | | | | | * commit 'bf704132a51f5d838365158331d4e535e1df4c8e': Don't anonymously typedef structs Conflicts: avprobe.c libavutil/parseutils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Don't anonymously typedef structsDiego Biurrun2015-02-141-3/+3
| |
* | Merge commit '82ee7d0dda0fec8cdb670f4e844bf5c2927ad9de'Michael Niedermayer2014-10-261-2/+3
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | * commit '82ee7d0dda0fec8cdb670f4e844bf5c2927ad9de': Use gmtime_r instead of gmtime and localtime_r instead of localtime Conflicts: libavformat/mov.c libavformat/mxfenc.c libavformat/wtvdec.c libavutil/parseutils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Use gmtime_r instead of gmtime and localtime_r instead of localtimeMartin Storsjö2014-10-261-3/+4
| | | | | | | | | | | | | | | | | | | | | | gmtime isn't thread safe in general. In msvcrt (which lacks gmtime_r), the buffer used by gmtime is thread specific though. One call to localtime is left in avconv_opt.c, where thread safety shouldn't matter (instead of making avconv depend on the libavutil internal header). Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '6b45f05ef5b241fd1513702119af9c30056a0ac5'Michael Niedermayer2013-12-121-2/+4
|\ \ | |/ | | | | | | | | | | | | | | | | | | * commit '6b45f05ef5b241fd1513702119af9c30056a0ac5': parseutils: fix discarding const attribute warning Conflicts: libavutil/parseutils.c See: fe87b2e79c734a111747a239943c7340f8d3f7d7 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * parseutils: fix discarding const attribute warningVittorio Giovara2013-12-121-2/+4
| |
| * Use the avstring.h locale-independent character type functionsReimar Döffinger2013-03-071-2/+2
| | | | | | | | | | | | Make sure the behavior does not change with the locale. Signed-off-by: Martin Storsjö <martin@martin.st>
* | lavu/parseutils: add av_get_known_color_name()Stefano Sabatini2013-10-271-0/+14
| |
* | lavu/parseutils: add more resolutionsNiv Sardi2013-10-071-0/+6
| | | | | | | | | | | | | | See http://en.wikipedia.org/wiki/Graphics_display_resolution Signed-off-by: Niv Sardi <xaiki@evilgiggle.com> Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
* | avutil/parseutils:make const tables static constMichael Niedermayer2013-08-111-2/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Force using a 64bit intermediate when calculating calendar time with ↵Carl Eugen Hoyos2013-03-081-1/+1
| | | | | | | | | | | | av_timegm(). Fixes a fate failure with icc 13.1
* | Remove incorrect use of ctype.h functions.Reimar Döffinger2013-03-031-5/+5
| | | | | | | | | | | | | | 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>
* | lavu/parseutils: allow MM:SS format for duration in av_parse_time()Senthilnathan M2013-02-221-0/+5
| | | | | | | | | | | | | | Fix trac ticket #2258. Signed-off-by: Senthilnathan M <senthilnathan.maadasamy@gmail.com> Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
* | lavu/parseutils: add digital cinema frame sizesDave Rice2013-02-031-0/+6
| | | | | | | | Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
* | Merge commit 'cb45553f577f8e0ebfe05d3287e1b6fa5859b967'Michael Niedermayer2012-12-051-6/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-3/+0
| |
* | lavu/parseutils: accept %J for hours >= 24.Nicolas George2012-12-021-2/+3
| | | | | | | | Allow to parse durations >= 24:00:00.
* | lavu/parseutils: add trailing characters check in av_parse_video_size()Stefano Sabatini2012-10-291-0/+4
| | | | | | | | | | Return an error in case the video size specifications contains spurious trailing chars, like in "320x240foobar".
* | lavu/parseutils: remove unused gcd variable in av_parse_ratio()Stefano Sabatini2012-10-221-1/+0
| | | | | | | | Fix warning.
* | lavu/parseutils: rework rational reduction logic in av_parse_ratio()Stefano Sabatini2012-10-201-6/+2
| | | | | | | | | | | | | | | | | | Avoid to divide num and den by gcd in case of a parsed expression, since that is already done in av_d2q(), and force reduction in case of "a:b" form, allowing to honour the max parameter. The latter change is consistent with the a/b case, and with the documentation.
* | Merge commit 'e002e3291e6dc7953f843abf56fc14f08f238b21'Michael Niedermayer2012-10-121-4/+5
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'e002e3291e6dc7953f843abf56fc14f08f238b21': Use the new aes/md5/sha/tree allocation functions avutil: Add functions for allocating opaque contexts for algorithms svq3: fix pointer type warning svq3: replace unsafe pointer casting with intreadwrite macros parseutils-test: various cleanups Conflicts: doc/APIchanges libavcodec/svq3.c libavutil/parseutils.c libavutil/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * parseutils-test: various cleanupsMans Rullgard2012-10-111-5/+6
| | | | | | | | | | | | | | | | | | - make tables static const - remove useless use of compound literal - break long lines - fix a comma/semicolon typo Signed-off-by: Mans Rullgard <mans@mansr.com>
* | Merge commit '15ba7f6525c0f56f0c8e3e3e0c0c5129de054f41'Michael Niedermayer2012-10-121-2/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | * commit '15ba7f6525c0f56f0c8e3e3e0c0c5129de054f41': parseutils: fix const removal warning prepare 9_beta1 release Conflicts: Changelog RELEASE libavutil/parseutils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * parseutils: fix const removal warningMans Rullgard2012-10-111-2/+1
| | | | | | | | | | | | | | | | | | | | The const qualifier is still removed although it happens inside the strtol() function so no warning is generated. Fixes: libavutil/parseutils.c:110:11: warning: assignment discards qualifiers from pointer target type Signed-off-by: Mans Rullgard <mans@mansr.com>
* | Merge commit 'b522000e9b2ca36fe5b2751096b9a5f5ed8f87e6'Michael Niedermayer2012-10-111-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'b522000e9b2ca36fe5b2751096b9a5f5ed8f87e6': avio: introduce avio_closep mpegtsenc: set muxing type notification to verbose vc1dec: Use correct spelling of "opposite" a64multienc: change mc_frame_counter to unsigned arm: call arm-specific rv34dsp init functions under if (ARCH_ARM) svq1: Drop a bunch of useless parentheses parseutils-test: do not print numerical error codes svq1: K&R formatting cosmetics Conflicts: doc/APIchanges libavcodec/svq1dec.c libavcodec/svq1enc.c libavformat/version.h libavutil/parseutils.c tests/ref/fate/parseutils Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * parseutils-test: do not print numerical error codesMans Rullgard2012-10-101-2/+2
| | | | | | | | | | | | | | The error codes differ between systems so printing the value makes the fate test fail on some systems. Signed-off-by: Mans Rullgard <mans@mansr.com>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-10-071-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: wmaenc: use float planar sample format (e)ac3enc: use planar sample format aacenc: use planar sample format adpcmenc: use planar sample format for adpcm_ima_wav and adpcm_ima_qt adpcmenc: move 'ch' variable to higher scope adpcmenc: fix 3 instances of variable shadowing adpcm_ima_wav: simplify encoding libvorbis: use planar sample format libmp3lame: use planar sample formats vorbisenc: use float planar sample format ffm: do not write or read the audio sample format parseutils: fix parsing of invalid alpha values doc/RELEASE_NOTES: update for the 9 release. smoothstreamingenc: Add a more verbose error message smoothstreamingenc: Ignore the return value from mkdir smoothstreamingenc: Try writing a manifest when opening the muxer smoothstreamingenc: Move the output_chunk_list and write_manifest functions up smoothstreamingenc: Properly return errors from ism_flush to the caller smoothstreamingenc: Check the output UrlContext before accessing it Conflicts: doc/RELEASE_NOTES libavcodec/aacenc.c libavcodec/ac3enc_template.c libavcodec/wmaenc.c tests/ref/lavf/ffm Merged-by: Michael Niedermayer <michaelni@gmx.at>
OpenPOWER on IntegriCloud