mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-01-12 00:06:51 +08:00
av{codec,util}/tests: Remove pointless undefs
Before commit e96d90eed6 lavu/internal.h
contained redefined various discouraged/forbidden functions to induce
compilation failures upon use, like e.g.
#define malloc please_use_av_malloc
In order to use these functions, some files had to undefine these
macros. This commit removes the remaining pointless undefs.
Reviewed-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -32,8 +32,6 @@
|
||||
#include "libavutil/bprint.h"
|
||||
#include "libavutil/time_internal.h"
|
||||
|
||||
#undef time
|
||||
|
||||
static int insert_text(AVBPrint *dst, const char *in, const char *arg)
|
||||
{
|
||||
av_bprintf(dst, "%s", arg);
|
||||
|
||||
@@ -36,8 +36,6 @@
|
||||
#include "libavutil/mem.h"
|
||||
#include "libavutil/time.h"
|
||||
|
||||
#undef printf
|
||||
|
||||
#define WIDTH 64
|
||||
#define HEIGHT 64
|
||||
|
||||
|
||||
@@ -20,10 +20,6 @@
|
||||
|
||||
#include "libavcodec/snowenc.c"
|
||||
|
||||
#undef malloc
|
||||
#undef free
|
||||
#undef printf
|
||||
|
||||
#include "libavutil/lfg.h"
|
||||
#include "libavutil/mathematics.h"
|
||||
#include "libavutil/mem.h"
|
||||
|
||||
@@ -22,8 +22,6 @@
|
||||
#include "libavfilter/audio.h"
|
||||
#include "libavfilter/formats.c"
|
||||
|
||||
#undef printf
|
||||
|
||||
const int64_t avfilter_all_channel_layouts[] = {
|
||||
AV_CH_FRONT_CENTER,
|
||||
AV_CH_FRONT_CENTER|AV_CH_LOW_FREQUENCY,
|
||||
|
||||
@@ -905,7 +905,6 @@ static int expand_timestamps(void *log, struct sbg_script *s)
|
||||
av_log(log, AV_LOG_WARNING,
|
||||
"Scripts with mixed absolute and relative timestamps can give "
|
||||
"unexpected results (pause, seeking, time zone change).\n");
|
||||
#undef time
|
||||
time(&now0);
|
||||
tm = localtime_r(&now0, &tmpbuf);
|
||||
now = tm ? tm->tm_hour * 3600 + tm->tm_min * 60 + tm->tm_sec :
|
||||
|
||||
@@ -120,7 +120,6 @@ int avpriv_tempfile(const char *prefix, char **filename, int log_offset, void *l
|
||||
if(!ptr)
|
||||
ptr= tempnam(".", prefix);
|
||||
*filename = av_strdup(ptr);
|
||||
#undef free
|
||||
free(ptr);
|
||||
#else
|
||||
return AVERROR(ENOSYS);
|
||||
|
||||
@@ -21,8 +21,6 @@
|
||||
#include "libavutil/avassert.h"
|
||||
#include "libavutil/bprint.c"
|
||||
|
||||
#undef printf
|
||||
|
||||
static void bprint_pascal(AVBPrint *b, unsigned size)
|
||||
{
|
||||
unsigned i, j;
|
||||
|
||||
@@ -18,8 +18,6 @@
|
||||
|
||||
#include "libavutil/error.c"
|
||||
|
||||
#undef printf
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -18,8 +18,6 @@
|
||||
|
||||
#include "libavutil/file.c"
|
||||
|
||||
#undef printf
|
||||
|
||||
int main(void)
|
||||
{
|
||||
uint8_t *buf;
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#include "libavutil/crc.h"
|
||||
#include "libavutil/mem.h"
|
||||
|
||||
#undef printf
|
||||
static int check_image_fill(enum AVPixelFormat pix_fmt, int w, int h) {
|
||||
uint8_t *data[4];
|
||||
size_t sizes[4];
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include "libavutil/pca.c"
|
||||
#include "libavutil/lfg.h"
|
||||
|
||||
#undef printf
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#define TEST 1
|
||||
#include "libavutil/random_seed.c"
|
||||
|
||||
#undef printf
|
||||
#define N 256
|
||||
#define F 2
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -26,9 +26,7 @@
|
||||
|
||||
#include "libswresample/swresample.h"
|
||||
|
||||
#undef time
|
||||
#include <time.h>
|
||||
#undef fprintf
|
||||
|
||||
#define SAMPLES 1000
|
||||
|
||||
|
||||
@@ -29,9 +29,6 @@
|
||||
#include "libavcodec/raw.h"
|
||||
#include "libavcodec/raw_pix_fmt_tags.h"
|
||||
|
||||
#undef printf
|
||||
#undef fprintf
|
||||
|
||||
#if !HAVE_GETOPT
|
||||
#include "compat/getopt.c"
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user