diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-06-06 03:02:38 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-06-06 03:33:58 +0200 |
commit | f9569249c274ab71b570d6a462903379e9d414fb (patch) | |
tree | 0b8f8c4930874a5115f6608a23b55eb2f5be1c34 /libavutil | |
parent | 6700aa8810d877cb017d977f12638481df459eb1 (diff) | |
parent | eb7505e4295dca9c3ab8c01e055a458e07857ef0 (diff) | |
download | ffmpeg-streaming-f9569249c274ab71b570d6a462903379e9d414fb.zip ffmpeg-streaming-f9569249c274ab71b570d6a462903379e9d414fb.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
Remove some unused scripts from tools/.
Add x86 assembly for some 10-bit H.264 intra predict functions.
v4l2: do not force NTSC as standard
Skip tableprint.h during 'make checkheaders'.
Remove unnecessary LIBAVFORMAT_BUILD #ifdef.
Drop explicit filenames from @file Doxygen tags.
Skip generated table headers during 'make checkheaders'.
lavf,lavc: free avoptions in a generic way.
AVOptions: add av_opt_free convenience function.
tableprint: Restore mistakenly deleted common.h #include for FF_ARRAY_ELEMS.
tiff: print log in case of unknown / unsupported tag.
tiff: fix linesize for mono-white/black formats.
Fix build of eval-test program
configure: Document --enable-vaapi
ac3enc: extract all exponents for the frame at once
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/Makefile | 2 | ||||
-rw-r--r-- | libavutil/internal.h | 2 | ||||
-rw-r--r-- | libavutil/opt.c | 8 | ||||
-rw-r--r-- | libavutil/opt.h | 5 |
4 files changed, 14 insertions, 3 deletions
diff --git a/libavutil/Makefile b/libavutil/Makefile index 1386ebb..01231bd 100644 --- a/libavutil/Makefile +++ b/libavutil/Makefile @@ -75,7 +75,7 @@ OBJS-$(ARCH_ARM) += arm/cpu.o OBJS-$(ARCH_PPC) += ppc/cpu.o OBJS-$(ARCH_X86) += x86/cpu.o -TESTPROGS = adler32 aes base64 cpu crc des lls md5 pca sha tree +TESTPROGS = adler32 aes base64 cpu crc des eval lls md5 pca sha tree TESTPROGS-$(HAVE_LZO1X_999_COMPRESS) += lzo DIRS = arm bfin sh4 x86 diff --git a/libavutil/internal.h b/libavutil/internal.h index 51bf409..d9ab8e9 100644 --- a/libavutil/internal.h +++ b/libavutil/internal.h @@ -142,7 +142,6 @@ #define strncpy strncpy_is_forbidden_due_to_security_issues_use_av_strlcpy #undef exit #define exit exit_is_forbidden -#ifndef LIBAVFORMAT_BUILD #undef printf #define printf please_use_av_log_instead_of_printf #undef fprintf @@ -151,7 +150,6 @@ #define puts please_use_av_log_instead_of_puts #undef perror #define perror please_use_av_log_instead_of_perror -#endif #define FF_ALLOC_OR_GOTO(ctx, p, size, label)\ {\ diff --git a/libavutil/opt.c b/libavutil/opt.c index 6b2bc77..f3c74a9 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -520,6 +520,14 @@ int av_set_options_string(void *ctx, const char *opts, return count; } +void av_opt_free(void *obj) +{ + const AVOption *o = NULL; + while ((o = av_next_option(obj, o))) + if (o->type == FF_OPT_TYPE_STRING || o->type == FF_OPT_TYPE_BINARY) + av_freep((uint8_t *)obj + o->offset); +} + #ifdef TEST #undef printf diff --git a/libavutil/opt.h b/libavutil/opt.h index b04c790..c967ed5 100644 --- a/libavutil/opt.h +++ b/libavutil/opt.h @@ -176,4 +176,9 @@ void av_opt_set_defaults2(void *s, int mask, int flags); int av_set_options_string(void *ctx, const char *opts, const char *key_val_sep, const char *pairs_sep); +/** + * Free all string and binary options in obj. + */ +void av_opt_free(void *obj); + #endif /* AVUTIL_OPT_H */ |