Commit Graph

56 Commits

Author SHA1 Message Date
Derek Buitenhuis 96d616052b Merge commit 'd12b5b2f135aade4099f4b26b0fe678656158c13'
* 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>
2016-05-11 19:13:03 +01:00
Diego Biurrun d12b5b2f13 build: Split test programs off into separate files
This avoids spurious library rebuilds when only the test program
code is changed and simplifies the build system.
2016-04-07 16:14:42 +02:00
Ganesh Ajjanagadde bbd6bc6bd0 avutil/tree: clean up pointer incompatibility warnings
Commit 7c8fcbbde3 introduced some warnings
that get triggered on the test build. This should fix them.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-25 12:45:10 -04:00
Ganesh Ajjanagadde 7c8fcbbde3 avutil/tree: add additional const qualifier to the comparator
libc's qsort comparator has a const qualifier on both arguments. This
adds a missing const qualifier to exactly match the comparator API.

Existing usages of av_tree_find, av_tree_insert are appropriately
modified: type signature changes of the comparators, and removal of
unnecessary void * casts of function pointers.

Reviewed-by: Henrik Gramner <henrik@gramner.com>
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-24 20:38:07 -04:00
Vittorio Giovara 2f9b652e8c lavu: Drop deprecated context size variables
Deprecated in 10/2012.
2015-08-28 16:04:27 +02:00
Derek Buitenhuis 530cd2893e tree-test: Don't return restricted exit codes
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-24 10:59:26 +01:00
Derek Buitenhuis 5dfdffeb6f tree-test: Don't return restricted exit codes
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-24 10:51:52 +01:00
Michael Niedermayer b326438139 avutil/tree: fix memleaks
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-01 11:29:12 +02:00
Michael Niedermayer 161054f37b Merge commit 'c2e936de07d054bf476e60445b453bf6b4836820'
* commit 'c2e936de07d054bf476e60445b453bf6b4836820':
  tree-test: Refactor and plug memory leaks

Conflicts:
	libavutil/tree.c

Most of this commit is not merged due to bugs in it

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-01 11:29:03 +02:00
Diego Biurrun c2e936de07 tree-test: Refactor and plug memory leaks
With the most annoying memory leak found by Derek Buitenhuis.
2013-07-31 18:14:08 +02:00
Michael Niedermayer 1f5755d869 Merge commit 'd99a2b6d0a4d0b2f5ba6a1f1637d6cb88c5c9184'
* commit 'd99a2b6d0a4d0b2f5ba6a1f1637d6cb88c5c9184':
  avutil/tree: Drop debug messages that clutter the output

Conflicts:
	libavutil/tree.c

Merge for metadata only, a better solution has been commited that allows the
debug output to be turned on and off

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-30 11:06:03 +02:00
Michael Niedermayer db75537e25 avutil/tree: allow adjusting the log level
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-30 11:04:48 +02:00
Michael Niedermayer 647836608c avutil/tree: change debug output to AV_LOG_DEBUG level
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-30 11:04:39 +02:00
Michael Niedermayer 93b3a5edff Merge commit '10db1a9bca46b0f760a1263d47142b2f57e195d7'
* commit '10db1a9bca46b0f760a1263d47142b2f57e195d7':
  avutil/tree: K&R formatting cosmetics

Conflicts:
	libavutil/tree.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-30 10:42:40 +02:00
Diego Biurrun d99a2b6d0a avutil/tree: Drop debug messages that clutter the output 2013-07-29 19:20:27 +02:00
Diego Biurrun 10db1a9bca avutil/tree: K&R formatting cosmetics 2013-07-29 19:20:27 +02:00
Michael Niedermayer 6c49562d79 tree-test: fix printf() types
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-31 03:10:35 +01:00
Michael Niedermayer 977cb54f94 tree: fix type used for testing the tree
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-29 22:21:25 +01:00
Michael Niedermayer ac090fa68c lavu: keep context size variables
They are essential to be able to use the utils without av_malloc()
That is for example use with malloc(), memalign(), some other
private allocation function, on the stack or others.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-28 14:33:41 +01:00
Michael Niedermayer f391e405df Merge commit 'e002e3291e6dc7953f843abf56fc14f08f238b21'
* 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>
2012-10-12 14:52:34 +02:00
Martin Storsjö e002e3291e Use the new aes/md5/sha/tree allocation functions
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-11 23:35:28 +03:00
Martin Storsjö 9a92aea27b avutil: Add functions for allocating opaque contexts for algorithms
The current API where the plain size is exposed is not of much
use - in most cases it is allocated dynamically anyway.

If allocated e.g. on the stack via an uint8_t array, there's no
guarantee that the struct's members are aligned properly (unless
the array is overallocated and the opaque pointer within it
manually aligned to some unspecified alignment).

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-11 23:35:27 +03:00
Michael Niedermayer c581cb4e4f Merge remote-tracking branch 'qatar/master'
* 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>
2012-08-16 16:20:30 +02:00
Martin Storsjö 1d9c2dc89a Don't include common.h from avutil.h
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-15 22:32:06 +03:00
Michael Niedermayer 707138593a Merge remote-tracking branch 'qatar/master'
* qatar/master:
  adpcmenc: cosmetics: pretty-printing
  ac3dec: cosmetics: pretty-printing
  yuv4mpeg: cosmetics: pretty-printing
  shorten: remove dead initialization
  roqvideodec: set AVFrame reference before reget_buffer.
  bmp: fix some 1bit samples.
  latmdec: add fate test for audio config change
  oma: PCM support
  oma: better format detection with small probe buffer
  oma: clearify ambiguous if condition
  wavpack: Properly clip samples during lossy decode
  Code clean-up for crc.c, lfg.c, log.c, random_see.d, rational.c and tree.c.
  Cleaned pixdesc.c file in libavutil
  zmbv.c: coding style clean-up.
  xan.c: coding style clean-up.
  mpegvideo.c: code cleanup - first 500 lines.

Conflicts:
	Changelog
	libavcodec/adpcmenc.c
	libavcodec/bmp.c
	libavcodec/zmbv.c
	libavutil/log.c
	libavutil/pixdesc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-05 00:11:57 +01:00
Yordan Makariev 425b45d4b0 Code clean-up for crc.c, lfg.c, log.c, random_see.d, rational.c and tree.c.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-12-03 15:13:48 -08:00
Mans Rullgard 2912e87a6c Replace FFmpeg with Libav in licence headers
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 13:33:20 +00:00
Måns Rullgård 2ed6f39944 Replace many includes of libavutil/common.h with what is actually needed
This reduces the number of false dependencies on header files and
speeds up compilation.

Originally committed as revision 22407 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-09 17:39:19 +00:00
Vitor Sessak 4b83fc0fe4 Plug memory leak in NUT muxer and demuxer
Originally committed as revision 22174 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-03 17:31:24 +00:00
Vitor Sessak 8a4d067dfc Revert r22119 and partially revert 22120.
Originally committed as revision 22135 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-01 18:16:10 +00:00
Vitor Sessak fee6faa2b6 Implement av_tree_destroy_free_elem() to destroy a tree and free all the
values stored on it.

Originally committed as revision 22119 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-28 20:48:42 +00:00
Michael Niedermayer b154ed5abe Fix indention after last commit.
Originally committed as revision 20538 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-11-14 19:15:09 +00:00
Michael Niedermayer edabf35926 Fix crash with av_tree_enumerate(NULL).
Originally committed as revision 20537 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-11-14 19:14:14 +00:00
Michael Niedermayer 1bf83b9548 Make sure av_tree_enumerate() enumerates left->right.
Originally committed as revision 20535 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-11-14 11:19:08 +00:00
Diego Biurrun 64bde1974b cosmetics: Rename prn variable to prng (Pseudo Random Number Generator).
Originally committed as revision 18422 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-10 17:23:38 +00:00
Benoit Fouet 168fffdf01 Fix warnings in tree.c test code.
Originally committed as revision 18267 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-31 14:00:46 +00:00
Diego Biurrun 504ffed19f Mark non-exported functions in test and example programs as static.
Originally committed as revision 18259 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-31 09:32:59 +00:00
Diego Biurrun 294eaa2643 Replace random() usage in test programs by av_lfg_*().
Originally committed as revision 18070 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-20 11:48:27 +00:00
Diego Biurrun 89c9ff504b spelling/grammar/consistency review part I
Originally committed as revision 16840 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-01-28 00:16:05 +00:00
Aurelien Jacobs 045cbba92d cosmetic: indent
Originally committed as revision 16423 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-01-04 17:48:54 +00:00
Aurelien Jacobs d8bd113ef4 add a termination condition
Originally committed as revision 16422 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-01-04 17:48:19 +00:00
Michael Niedermayer eed3607564 Avoid undefined behavior for removing elements that were not in the tree.
Originally committed as revision 15368 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-09-19 12:41:12 +00:00
Michael Niedermayer 51198a8737 Comment to explain how the add/remove core works.
Originally committed as revision 11603 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-01-23 21:03:21 +00:00
Michael Niedermayer 5d1e3d2210 Print removing of nodes in the test code.
Originally committed as revision 11534 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-01-16 01:54:56 +00:00
Michael Niedermayer 3f161c7eab simplify
Originally committed as revision 11533 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-01-16 01:54:18 +00:00
Diego Biurrun a005768d25 Remove unused variable j.
Originally committed as revision 11472 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-01-08 22:53:25 +00:00
Michael Niedermayer a35bf971c6 indent
Originally committed as revision 11405 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-01-04 19:16:38 +00:00
Michael Niedermayer 2e1d287329 Flip key and element so types match, not that it matters for any code
using it in libav*.

Originally committed as revision 11404 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-01-04 18:58:36 +00:00
Michael Niedermayer d5cb5fe86b Fix selftest.
Originally committed as revision 11401 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-01-04 18:21:36 +00:00
Michael Niedermayer f05dda3b7a Support removing elements.
Originally committed as revision 11400 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-01-04 18:20:03 +00:00