Commit b9ffafbf authored by Michael Niedermayer's avatar Michael Niedermayer

avfilter/formats: Alloc NULL fmts in SET_COMMON_FORMATS()

This avoids null pointer dereferences in case memory allocation has failed
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 75819faf
......@@ -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++) { \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment