Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/internal.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/libavutil/internal.h b/libavutil/internal.h
index 1353399b92..a129bfb35f 100644
--- a/libavutil/internal.h
+++ b/libavutil/internal.h
@@ -249,21 +249,21 @@ if ((y) < (x)) {\
#define perror please_use_av_log_instead_of_perror
#endif
-#define CHECKED_ALLOC(p, size)\
+#define FF_ALLOC_OR_GOTO(ctx, p, size, label)\
{\
p = av_malloc(size);\
if (p == NULL && (size) != 0) {\
- av_log(NULL, AV_LOG_ERROR, "Cannot allocate memory.\n");\
- goto fail;\
+ av_log(ctx, AV_LOG_ERROR, "Cannot allocate memory.\n");\
+ goto label;\
}\
}
-#define CHECKED_ALLOCZ(p, size)\
+#define FF_ALLOCZ_OR_GOTO(ctx, p, size, label)\
{\
p = av_mallocz(size);\
if (p == NULL && (size) != 0) {\
- av_log(NULL, AV_LOG_ERROR, "Cannot allocate memory.\n");\
- goto fail;\
+ av_log(ctx, AV_LOG_ERROR, "Cannot allocate memory.\n");\
+ goto label;\
}\
}