#define FF_ALLOC_TYPED_ARRAY(p, nelem) (p = av_malloc_array(nelem, sizeof(*p)))
#define FF_ALLOCZ_TYPED_ARRAY(p, nelem) (p = av_mallocz_array(nelem, sizeof(*p)))
-#define FF_ALLOC_OR_GOTO(ctx, p, size, label)\
-{\
- p = av_malloc(size);\
- if (!(p) && (size) != 0) {\
- av_log(ctx, AV_LOG_ERROR, "Cannot allocate memory.\n");\
- goto label;\
- }\
-}
-
-#define FF_ALLOCZ_OR_GOTO(ctx, p, size, label)\
-{\
- p = av_mallocz(size);\
- if (!(p) && (size) != 0) {\
- av_log(ctx, AV_LOG_ERROR, "Cannot allocate memory.\n");\
- goto label;\
- }\
-}
-
-#define FF_ALLOC_ARRAY_OR_GOTO(ctx, p, nelem, elsize, label)\
-{\
- p = av_malloc_array(nelem, elsize);\
- if (!p) {\
- av_log(ctx, AV_LOG_ERROR, "Cannot allocate memory.\n");\
- goto label;\
- }\
-}
-
-#define FF_ALLOCZ_ARRAY_OR_GOTO(ctx, p, nelem, elsize, label)\
-{\
- p = av_mallocz_array(nelem, elsize);\
- if (!p) {\
- av_log(ctx, AV_LOG_ERROR, "Cannot allocate memory.\n");\
- goto label;\
- }\
-}
-
#include "libm.h"
/**