aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/mem.c
Commit message (Collapse)AuthorAgeFilesLines
* mem.c: fix wrong comment.Reimar Döffinger2012-04-161-3/+4
| | | | | | | | 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-291-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-271-1/+0
| |
* | mem: add av_max_alloc() to limit the maximum amount that may be allocated in ↵Michael Niedermayer2011-12-251-3/+7
| | | | | | | | | | | | 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-111-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mem: fix memalign hack av_realloc()Michael Niedermayer2011-10-111-1/+3
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Introduce av_realloc_f.Nicolas George2011-09-281-0/+15
| | | | | | | | | | | | | | 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-251-0/+7
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mem: Trying to workaround posix_memalign() bug on OSXMichael Niedermayer2011-06-071-0/+1
| | | | | | | | | | | | 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-241-2/+4
| | | | | | | | | | 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-121-0/+2
| | | | | | | | | | | | | | | | | | 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-101-4/+6
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Only add 1 byte to av_malloc(0) when it actually returned NULLMichael Niedermayer2011-05-071-2/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Make av_realloc(0) behave like our av_malloc(0)Michael Niedermayer2011-05-071-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '85770f2a2651497861ed938efcd0df3696ff5e45'Michael Niedermayer2011-05-011-0/+20
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-291-0/+20
| |/
* | Fix all malloc(0) issuesMichael Niedermayer2011-04-291-0/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-04-271-9/+7
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-261-9/+7
| | | | | | | | Signed-off-by: Reinhard Tartler <siretart@tauware.de>
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-04-201-3/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-191-3/+3
| |
| * Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-191-4/+4
| | | | | | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
| * Avoid pointless check before calling freeClément Bœsch2011-02-031-3/+2
| | | | | | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* | Avoid pointless check before calling freeClément Bœsch2011-02-041-3/+2
|/ | | | | 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-041-3/+3
| | | | | | 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-201-1/+1
| | | | | | | | 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-281-0/+17
| | | | | | | 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-211-1/+2
| | | | | | 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-011-1/+1
| | | | | | | 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-281-8/+8
| | | | 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-251-0/+5
| | | | 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-251-0/+2
| | | | Originally committed as revision 16792 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Do not #include common.h without necessity.Diego Biurrun2009-01-251-6/+0
| | | | | | | 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-241-0/+3
| | | | Originally committed as revision 16748 to svn://svn.ffmpeg.org/ffmpeg/trunk
* cosmetics: Remove pointless period after copyright statement non-sentences.Diego Biurrun2009-01-191-1/+1
| | | | Originally committed as revision 16684 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Change semantic of CONFIG_*, HAVE_* and ARCH_*.Aurelien Jacobs2009-01-131-8/+8
| | | | | | 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-071-1/+4
| | | | Originally committed as revision 16488 to svn://svn.ffmpeg.org/ffmpeg/trunk
* indentMichael Niedermayer2008-05-231-4/+4
| | | | Originally committed as revision 13251 to svn://svn.ffmpeg.org/ffmpeg/trunk
* make av_strdup(NULL) return NULLMichael Niedermayer2008-05-231-1/+3
| | | | Originally committed as revision 13250 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Merge declaratio and initialization.Michael Niedermayer2008-04-031-2/+1
| | | | Originally committed as revision 12677 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Merge declaration and initialization.Michael Niedermayer2008-04-031-3/+1
| | | | Originally committed as revision 12676 to svn://svn.ffmpeg.org/ffmpeg/trunk
* typo fixesDiego Biurrun2008-03-121-1/+1
| | | | Originally committed as revision 12428 to svn://svn.ffmpeg.org/ffmpeg/trunk
* misc spelling fixesDiego Biurrun2008-03-101-2/+2
| | | | Originally committed as revision 12410 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Avoid void*-arithmetic.avcoder2008-02-141-3/+3
| | | | | | Patch by mvplayer: ffmpeg gmail com Originally committed as revision 11932 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Move unaltered av_freep() comments to the header file.Panagiotis Issaris2007-03-051-4/+0
| | | | Originally committed as revision 8253 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Move unaltered av_free() comments to the header file.Panagiotis Issaris2007-03-051-5/+0
| | | | Originally committed as revision 8252 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Move unaltered av_realloc() comments to the header file.Panagiotis Issaris2007-03-051-5/+0
| | | | Originally committed as revision 8251 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Move unaltered av_malloc() comments to the header file.Panagiotis Issaris2007-03-051-5/+0
| | | | Originally committed as revision 8250 to svn://svn.ffmpeg.org/ffmpeg/trunk
* cosmetics: Fix another common typo, dependAnt --> dependEnt.Diego Biurrun2007-02-241-1/+1
| | | | Originally committed as revision 8114 to svn://svn.ffmpeg.org/ffmpeg/trunk
* rename MEMALIGN_HACK to CONFIG_MEMALIGN_HACK, use common code in configureMåns Rullgård2006-11-141-5/+5
| | | | Originally committed as revision 7025 to svn://svn.ffmpeg.org/ffmpeg/trunk