summaryrefslogtreecommitdiff
path: root/libavutil/mem.c
Commit message (Collapse)AuthorAge
* Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-10-25
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: avutil: Make LZO decoder code configure-time selectable avutil: Move memcpy_backptr() to mem.c configure: detect parisc64 automatically configure: detect ppc64 automatically configure: detect mips64 automatically configure: generalise 64-bit test smoothstreamingenc: Don't assume streams start from timestamp 0 Conflicts: configure libavutil/Makefile libavutil/lzo.c libavutil/lzo.h libavutil/mem.c libavutil/mem.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avutil: Move memcpy_backptr() to mem.cDiego Biurrun2012-10-25
| | | | | | | | The function is used elsewhere and does not belong with the LZO code.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-10-20
|\| | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: configure: Group math functions into a separate variable avutil/mem: K&R formatting cosmetics avutil/lzo: K&R formatting cosmetics Conflicts: configure libavutil/mem.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avutil/mem: K&R formatting cosmeticsDiego Biurrun2012-10-20
| |
| * mem: Don't abort on av_malloc(0) in debug modeMartin Storsjö2012-07-10
| | | | | | | | | | | | This makes the behaviour consistent between debug and release mode. Signed-off-by: Martin Storsjö <martin@martin.st>
* | mem: heap memory poisoning.Clément Bœsch2012-07-02
| | | | | | | | | | Enable it by default with FATE. limitation: not random, and not supported with realloc.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-06-19
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (24 commits) flvdec: remove incomplete, disabled seeking code mem: add support for _aligned_malloc() as found on Windows lavc: Extend the documentation for avcodec_init_packet flvdec: remove incomplete, disabled seeking code http: replace atoll() with strtoll() mpegts: remove unused/incomplete/broken seeking code af_amix: allow float planar sample format as input af_amix: use AVFloatDSPContext.vector_fmac_scalar() float_dsp: add x86-optimized functions for vector_fmac_scalar() float_dsp: Move vector_fmac_scalar() from libavcodec to libavutil lavr: Add x86-optimized function for flt to s32 conversion lavr: Add x86-optimized function for flt to s16 conversion lavr: Add x86-optimized functions for s32 to flt conversion lavr: Add x86-optimized functions for s32 to s16 conversion lavr: Add x86-optimized functions for s16 to flt conversion lavr: Add x86-optimized function for s16 to s32 conversion rtpenc: Support packetizing iLBC rtpdec: Add a depacketizer for iLBC Implement the iLBC storage file format mov: Support muxing/demuxing iLBC ... Conflicts: Changelog configure libavcodec/avcodec.h libavcodec/dsputil.c libavcodec/version.h libavformat/movenc.c libavformat/mpegts.c libavformat/version.h libavutil/mem.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mem: add support for _aligned_malloc() as found on WindowsRonald S. Bultje2012-06-19
| | | | | | | | | | | | | | | | The check uses check_func_header, since this function is conditionally available depending on the targeted MSVCRT version. Signed-off-by: Martin Storsjö <martin@martin.st>
| * mem: Consistently return NULL for av_malloc(0)Martin Storsjö2012-04-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Plain POSIX malloc(0) is allowed to return either NULL or a non-NULL pointer. The calling code should be ready to handle a NULL return as a correct return (instead of a failure) if the size to allocate was 0 - this makes sure the condition is handled in a consistent way across platforms. This also avoids calling posix_memalign(&ptr, 32, 0) on OS X, which returns an invalid pointer (a non-NULL pointer that causes crashes when passed to av_free). Abort in debug mode, to help track down issues related to incorrect handling of this case. Signed-off-by: Martin Storsjö <martin@martin.st>
* | mem.c: fix wrong comment.Reimar Döffinger2012-04-16
| | | | | | | | | | | | | | | | Overwriting the av_malloc etc. functions is not easily possible anymore, even for systems that support overriding symbols in shared libraries in principle. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-01-29
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: aacenc: Fix LONG_START windowing. aacenc: Fix a bug where deinterleaved samples were stored in the wrong place. avplay: use the correct array size for stride. lavc: extend doxy for avcodec_alloc_context3(). APIchanges: mention avcodec_alloc_context()/2/3 avcodec_align_dimensions2: set only 4 linesizes, not AV_NUM_DATA_POINTERS. aacsbr: ARM NEON optimised sbrdsp functions aacsbr: align some arrays aacsbr: move some simdable loops to function pointers cosmetics: Remove extra newlines at EOF Conflicts: libavcodec/utils.c libavfilter/formats.c libavutil/mem.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * cosmetics: Remove extra newlines at EOFAlex Converse2012-01-27
| |
* | mem: add av_max_alloc() to limit the maximum amount that may be allocated in ↵Michael Niedermayer2011-12-25
| | | | | | | | | | | | one piece Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Correct use of OSX to Mac OS X and properly format yasm providers on Mac OS XHanspeter Niederstrasser2011-12-11
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mem: fix memalign hack av_realloc()Michael Niedermayer2011-10-11
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Introduce av_realloc_f.Nicolas George2011-09-28
| | | | | | | | | | | | | | av_realloc_f helps avoiding memory-leaks in typical uses of realloc. Signed-off-by: Nicolas George <nicolas.george@normalesup.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Add av_calloc() helper.Laurent Aimar2011-09-25
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mem: Trying to workaround posix_memalign() bug on OSXMichael Niedermayer2011-06-07
| | | | | | | | | | | | This patch is based on a patch by John Stebbins Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mem: define the MAX_MALLOC_SIZE constant and use it in place of INT_MAXStefano Sabatini2011-05-24
| | | | | | | | | | This makes re-dimensionating the constant simpler, since now it is defined only in one place.
* | Fix posix_memalign() usage when libavutil is compiled outside FFmpeg.Ivan Kalvachev2011-05-12
| | | | | | | | | | | | | | | | | | To use posix_memalign() "#define _XOPEN_SOURCE 600" have to be defined. FFmpeg configure defines it from the command line through config.mak, but when libavutil is used outside of FFmpeg the define is missing. Signed-off-by: Ivan Kalvachev <ikalvachev@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mem: Choose alignment at compile time depending on AVX enabledness.Michael Niedermayer2011-05-10
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Only add 1 byte to av_malloc(0) when it actually returned NULLMichael Niedermayer2011-05-07
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Make av_realloc(0) behave like our av_malloc(0)Michael Niedermayer2011-05-07
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '85770f2a2651497861ed938efcd0df3696ff5e45'Michael Niedermayer2011-05-01
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '85770f2a2651497861ed938efcd0df3696ff5e45': AVOptions: make default_val a union, as proposed in AVOption2. Move ff_dynarray_add to lavu and make it public. lavf: remove duplicate assignment in avformat_alloc_context. lavf: use designated initializers for AVClasses. options: simplify av_find_opt by using av_next_option. Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * | Move ff_dynarray_add to lavu and make it public.Anton Khirnov2011-04-29
| |/
* | Fix all malloc(0) issuesMichael Niedermayer2011-04-29
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-04-27
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (23 commits) ac3enc: correct the flipped sign in the ac3_fixed encoder Eliminate pointless '#if 1' statements without matching '#else'. Add AVX FFT implementation. Increase alignment of av_malloc() as needed by AVX ASM. Update x86inc.asm from x264 to allow AVX emulation using SSE and MMX. mjpeg: Detect overreads in mjpeg_decode_scan() and error out. documentation: extend documentation for ffmpeg -aspect option APIChanges: update commit hashes for recent additions. lavc: deprecate FF_*_TYPE macros in favor of AV_PICTURE_TYPE_* enums aac: add headers needed for log2f() lavc: remove FF_API_MB_Q cruft lavc: remove FF_API_RATE_EMU cruft lavc: remove FF_API_HURRY_UP cruft pad: make the filter parametric vsrc_movie: add key_frame and pict_type. vsrc_movie: fix leak in request_frame() lavfi: add key_frame and pict_type to AVFilterBufferRefVideo. vsrc_buffer: add sample_aspect_ratio fields to arguments. lavfi: add fieldorder filter scale: make the filter parametric ... Conflicts: Changelog doc/filters.texi ffmpeg.c libavcodec/ac3dec.h libavcodec/dsputil.c libavfilter/avfilter.h libavfilter/vf_scale.c libavfilter/vf_yadif.c libavfilter/vsrc_buffer.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Increase alignment of av_malloc() as needed by AVX ASM.Vitor Sessak2011-04-26
| | | | | | | | Signed-off-by: Reinhard Tartler <siretart@tauware.de>
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-04-20
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (37 commits) In avcodec_open(), set return code to an error value only when an error occurs instead of unconditionally at the start of the function. lavc: remove reference to opt.h from Makefile. prefer avio_check() over url_exist() avio: remove AVIO_* access symbols in favor of new AVIO_FLAG_* symbols lavu: remove misc disabled cruft lavu: remove FF_API_OLD_IMAGE_NAMES cruft NOT PULLED lavu: remove FF_API_OLD_EVAL_NAMES cruft lavc: remove misc disabled cruft. lavc: remove the FF_API_INOFFICIAL cruft. lavc: remove the FF_API_SET_STRING_OLD cruft. lavc: remove the FF_API_USE_LPC cruft. lavc: remove the FF_API_SUBTITLE_OLD cruft. lavc: remove the FF_API_VIDEO_OLD cruft. lavc: remove the FF_API_AUDIO_OLD cruft. lavc: remove the FF_API_OPT_SHOW cruft. lavc: remove the FF_API_MM_FLAGS cruft. lavf: remove misc disabled cruft. lavf: remove FF_API_INDEX_BUILT cruft lavf: remove FF_API_URL_CLASS cruft. lavf: remove FF_API_SYMVER cruft ... Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavu: remove misc disabled cruftAnton Khirnov2011-04-19
| |
| * Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-19
| | | | | | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
| * Avoid pointless check before calling freeClément Bœsch2011-02-03
| | | | | | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* | Avoid pointless check before calling freeClément Bœsch2011-02-04
|/ | | | | Signed-off-by: Mans Rullgard <mans@mansr.com> (cherry picked from commit dc75d6dbf2af3c03b33d3159e1dadccf22c076ea)
* Change the argument of memory allocation functions from unsigned int to size_tMichael Niedermayer2010-12-04
| | | | | | with the next major bump in libavutil. Originally committed as revision 25871 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove explicit filename from Doxygen @file commands.Diego Biurrun2010-04-20
| | | | | | | | Passing an explicit filename to this command is only necessary if the documentation in the @file block refers to a file different from the one the block resides in. Originally committed as revision 22921 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add --malloc-prefix to apply a prefix to malloc, free etcMåns Rullgård2010-01-28
| | | | | | | This makes it easy to use a replacement allocator instead of the system default one. Originally committed as revision 21509 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Check return value of posix_memalign and explicitly set pointer to NULL if itPatrik Kullman2009-02-21
| | | | | | fails, patch by Patrik Kullman, patrik yes nu. Originally committed as revision 17495 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Use full internal pathname in doxygen @file directives.Diego Biurrun2009-02-01
| | | | | | | Otherwise doxygen complains about ambiguous filenames when files exist under the same name in different subdirectories. Originally committed as revision 16912 to svn://svn.ffmpeg.org/ffmpeg/trunk
* spelling/grammar/consistency review part IDiego Biurrun2009-01-28
| | | | Originally committed as revision 16840 to svn://svn.ffmpeg.org/ffmpeg/trunk
* 10l: Add #undefs for system free/malloc/realloc, which must be used here.Diego Biurrun2009-01-25
| | | | Originally committed as revision 16794 to svn://svn.ffmpeg.org/ffmpeg/trunk
* C files should #include the header files of the same name.Diego Biurrun2009-01-25
| | | | Originally committed as revision 16792 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Do not #include common.h without necessity.Diego Biurrun2009-01-25
| | | | | | | This eliminates the need to work around common.h overriding certain system functions which are required in this header. Originally committed as revision 16776 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Directly #include a bunch of indirectly #included headers.Diego Biurrun2009-01-24
| | | | Originally committed as revision 16748 to svn://svn.ffmpeg.org/ffmpeg/trunk
* cosmetics: Remove pointless period after copyright statement non-sentences.Diego Biurrun2009-01-19
| | | | Originally committed as revision 16684 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Change semantic of CONFIG_*, HAVE_* and ARCH_*.Aurelien Jacobs2009-01-13
| | | | | | They are now always defined to either 0 or 1. Originally committed as revision 16590 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Use posix_memalign() if available.Ramiro Polla2009-01-07
| | | | Originally committed as revision 16488 to svn://svn.ffmpeg.org/ffmpeg/trunk
* indentMichael Niedermayer2008-05-23
| | | | Originally committed as revision 13251 to svn://svn.ffmpeg.org/ffmpeg/trunk
* make av_strdup(NULL) return NULLMichael Niedermayer2008-05-23
| | | | Originally committed as revision 13250 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Merge declaratio and initialization.Michael Niedermayer2008-04-03
| | | | Originally committed as revision 12677 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Merge declaration and initialization.Michael Niedermayer2008-04-03
| | | | Originally committed as revision 12676 to svn://svn.ffmpeg.org/ffmpeg/trunk