summaryrefslogtreecommitdiff
path: root/libavutil/parseutils.c
Commit message (Collapse)AuthorAge
* Force using a 64bit intermediate when calculating calendar time with ↵Carl Eugen Hoyos2013-03-08
| | | | | | av_timegm(). Fixes a fate failure with icc 13.1
* 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>
* lavu/parseutils: allow MM:SS format for duration in av_parse_time()Senthilnathan M2013-02-22
| | | | | | | 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-03
| | | | Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
* Merge commit 'cb45553f577f8e0ebfe05d3287e1b6fa5859b967'Michael Niedermayer2012-12-05
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-04
| |
* | lavu/parseutils: accept %J for hours >= 24.Nicolas George2012-12-02
| | | | | | | | Allow to parse durations >= 24:00:00.
* | lavu/parseutils: add trailing characters check in av_parse_video_size()Stefano Sabatini2012-10-29
| | | | | | | | | | 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-22
| | | | | | | | Fix warning.
* | lavu/parseutils: rework rational reduction logic in av_parse_ratio()Stefano Sabatini2012-10-20
| | | | | | | | | | | | | | | | | | 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-12
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-11
| | | | | | | | | | | | | | | | | | - 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-12
|\| | | | | | | | | | | | | | | | | | | | | | | | | * 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-11
| | | | | | | | | | | | | | | | | | | | 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-11
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-10
| | | | | | | | | | | | | | 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-07
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * parseutils: fix parsing of invalid alpha valuesMans Rullgard2012-10-06
| | | | | | | | | | | | | | | | | | | | An alpha specifier outside the valid range results in a conversion from double to long with undefined result. Range-checking the double and only converting it after it passes avoids this. Fixes fate-parseutils errors on some systems. Signed-off-by: Mans Rullgard <mans@mansr.com>
| * parseutils-test: Drop random colors from parsing testDiego Biurrun2012-10-06
| | | | | | | | This guarantees stable output for comparing test results.
* | fate: add av_small_strptime() test to fate-parseutilsStefano Sabatini2012-09-17
| |
* | lavu/parseutils: fix av_small_strptime() whitespace directive parsingStefano Sabatini2012-09-17
| | | | | | | | | | | | | | | | | | According to POSIX, strptime() should consume whitespaces in the date string everytime a whitespace conversion specification is found in the date format specification. Make av_small_strptime() conform with this behavior. In particular, should fix trac ticket #1739.
* | lavu/parseutils: add av_small_strptime()Stefano Sabatini2012-09-06
| | | | | | | | | | | | | | | | | | Make internal small_strptime() function public, and use it in place of strptime(). This allows to avoid a dependency on strptime() on systems which do not support it. In particular, fix trac ticket #992.
* | lavu/parseutils: make small_strptime() return a (non const) char *Stefano Sabatini2012-09-06
| | | | | | | | This is consistent with the standard definition of strptime().
* | 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>
* | parseutils: ignore digits below the microsecond.Nicolas George2012-07-10
| | | | | | | | | | Accept 1.1234567 as simply 1.123456 instead of rejecting it. The rounding is towards 0, which is acceptable and much simpler.
* | parseutils: fix sorting of colorsPaul B Mahol2012-06-28
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-06-20
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: MS Screen 1 decoder aacdec: Fix popping channel layouts. av_gettime: support Win32 without gettimeofday() Use av_gettime() in various places Move av_gettime() to libavutil dct-test: use emms_c() from libavutil instead of duplicating it mov: fix operator precedence bug mathematics.h: remove a couple of math defines Remove unnecessary inclusions of [sys/]time.h lavf: remove unnecessary inclusions of unistd.h bfin: libswscale: add const where appropriate to fix warnings bfin: libswscale: remove unnecessary #includes udp: Properly check for invalid sockets tcp: Check the return value from getsockopt network: Use av_strerror for getting error messages udp: Properly print error from getnameinfo mmst: Use AVUNERROR() to convert error codes to the right range for strerror network: Pass pointers of the right type to get/setsockopt/ioctlsocket on windows rtmp: Reduce the number of idle posts sent by sleeping 50ms Conflicts: Changelog configure libavcodec/aacdec.c libavcodec/allcodecs.c libavcodec/avcodec.h libavcodec/dct-test.c libavcodec/version.h libavformat/riff.c libavformat/udp.c libavutil/Makefile libswscale/bfin/yuv2rgb_bfin.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Remove unnecessary inclusions of [sys/]time.hMans Rullgard2012-06-20
| | | | | | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* | tests/parseutils: change test to make it platform independentStefano Sabatini2012-06-11
| | | | | | | | | | Make the test independent from the actual error string used to describe a certain error code.
* | parseutils: use strings instead of integers for error codes.Michael Niedermayer2012-05-09
| | | | | | | | | | | | error values can differ between platforms. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | parseutils: fix ;/, errorMichael Niedermayer2012-05-09
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | parseutils: replace setenv() by putenv().Nicolas George2012-04-27
| | | | | | | | putenv() seems to be more portable.
* | parseutils: reliably detect out-of-range alpha.Reimar Döffinger2012-04-24
| | | | | | | | | | | | | | | | | | This should fix the FATE test on ARM (not tested), but it should also detect alpha values like 2^128 reliably as invalid which would be another out-of-range case with implementation-dependant behaviour. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | parseutils: add av_parse_time() test.Nicolas George2012-04-23
| |
* | parseutils: make av_parse_time() check for failure.Nicolas George2012-04-23
| | | | | | | | | | | | | | Until now, av_parse_time() would accept "1:00" as "1" and silently ignore ":00". This patch also includes a few cosmetic changes.
* | parseutils: add FATE test.Nicolas George2012-04-23
| |
* | parseutils: include errors in test output.Nicolas George2012-04-17
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-03-29
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: asf: only set index_read if the index contained entries. cabac: add overread protection to BRANCHLESS_GET_CABAC(). cabac: increment jump locations by one in callers of BRANCHLESS_GET_CABAC(). cabac: remove unused argument from BRANCHLESS_GET_CABAC_UPDATE(). cabac: use struct+offset instead of memory operand in BRANCHLESS_GET_CABAC(). h264: add overread protection to get_cabac_bypass_sign_x86(). h264: reindent get_cabac_bypass_sign_x86(). h264: use struct offsets in get_cabac_bypass_sign_x86(). h264: fix overreads in cabac reader. wmall: fix seeking. lagarith: fix buffer overreads. dvdec: drop unnecessary dv_tablegen.h #include build: fix doc generation errors in parallel builds Replace memset(0) by zero initializations. faandct: Remove FAAN_POSTSCALE define and related code. dvenc: print allowed profiles if the video doesn't conform to any of them. avcodec_encode_{audio,video}: only reallocate output packet when it has non-zero size. FATE: add a test for vp8 with changing frame size. fate: add kgv1 fate test. oggdec: calculate correct timestamps in Ogg/FLAC Conflicts: libavcodec/4xm.c libavcodec/cook.c libavcodec/dvdata.c libavcodec/dvdsubdec.c libavcodec/lagarith.c libavcodec/lagarithrac.c libavcodec/utils.c tests/fate/video.mak Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Replace memset(0) by zero initializations.Diego Biurrun2012-03-28
| | | | | | | | Also remove one pointless zero initialization in rangecoder.c.
* | lavu: introduce av_parse_ratio() and use it in ffmpeg and lavfi/aspectStefano Sabatini2012-02-06
| | | | | | | | Factorize code and provide ratio parsing consistency.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-11-17
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: mpegaudiodec: Don't use a nonexistent log context for av_dlog avformat: Accept the ISO8601 separate format as input, too avformat: Interpret times in ff_iso8601_to_unix_time as UTC avutil: Add av_timegm as a public function cinepak: Add another special case so that it can handle the following file: lagarith: add some RGBA decoding support lagarith: Add correct line prediction for RGB Conflicts: doc/APIchanges libavcodec/cinepak.c libavutil/avutil.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avutil: Add av_timegm as a public functionMartin Storsjö2011-11-16
| | | | | | | | | | | | | | | | | | | | This is useful, since the normal timegm function isn't a standard function (requiring _BSD_SOURCE or _SVID_SOURCE on glibc to be visible, and not available on e.g. windows). The widely available function mktime uses the local time zone, which requires ugly workarounds to handle UTC time. Signed-off-by: Martin Storsjö <martin@martin.st>
| * Replace all usage of strcasecmp/strncasecmpReimar Döffinger2011-11-06
| | | | | | | | | | | | | | | | | | | | | | 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: Martin Storsjö <martin@martin.st>
* | color_table array should be const.Reimar Döffinger2011-11-05
| | | | | | | | Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | Replace all strcasecmp/strncasecmp usages.Reimar Döffinger2011-11-03
| | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-11-03
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (44 commits) replacement Indeo 3 decoder gsm demuxer: do not allocate packet twice. flvenc: use first packet delay as global delay. ac3enc: doxygen update. imc: return error codes instead of 0 for error conditions. imc: return meaningful error codes instead of -1 imc: do not set channel layout for stereo imc: validate channel count imc: check for ff_fft_init() failure imc: check output buffer size before decoding imc: use DSPContext.bswap16_buf() to byte-swap packet data rtsp: add allowed_media_types option libgsm: add flush function to reset the decoder state when seeking libgsm: simplify decoding by using a loop gsm: log error message when packet is too small libgsmdec: do not needlessly set *data_size to 0 gsmdec: do not needlessly set *data_size to 0 gsmdec: add flush function to reset the decoder state when seeking libgsmdec: check output buffer size before decoding gsmdec: log error message when output buffer is too small. ... Conflicts: Changelog ffplay.c libavcodec/indeo3.c libavcodec/mjpeg_parser.c libavcodec/vp3.c libavformat/cutils.c libavformat/id3v2.c libavutil/parseutils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Replace some forgotten FFmpeg references by Libav.Diego Biurrun2011-11-02
| |
* | parseutils: fix various cast qualifier warnings.Michael Niedermayer2011-10-17
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | parseutils: add some documentation for small_strptime()Stefano Sabatini2011-07-23
| |