aboutsummaryrefslogtreecommitdiffstats
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
parent75819fafd8213875af2bfbe5ea821ae5b8d419f9 (diff)
downloadffmpeg-b9ffafbfcc0f8aaffc9de3919a1d295dbe6d53f7.tar.gz
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>
-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++) { \