summaryrefslogtreecommitdiff
path: root/libavfilter/formats.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-11-21 22:15:32 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-11-21 22:15:32 +0100
commitb9ffafbfcc0f8aaffc9de3919a1d295dbe6d53f7 (patch)
tree4b59a03851ba1135f6e77dcb70ed79737b14c924 /libavfilter/formats.c
parent75819fafd8213875af2bfbe5ea821ae5b8d419f9 (diff)
avfilter/formats: Alloc NULL fmts in SET_COMMON_FORMATS()
This avoids null pointer dereferences in case memory allocation has failed Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/formats.c')
-rw-r--r--libavfilter/formats.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/formats.c b/libavfilter/formats.c
index 42afcf4ab4..eb3b87a56c 100644
--- a/libavfilter/formats.c
+++ b/libavfilter/formats.c
@@ -494,7 +494,7 @@ void ff_formats_changeref(AVFilterFormats **oldref, AVFilterFormats **newref)
}
#define SET_COMMON_FORMATS(ctx, fmts, in_fmts, out_fmts, ref, list) \
-{ \
+if (fmts) { \
int count = 0, i; \
\
for (i = 0; i < ctx->nb_inputs; i++) { \