mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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>
This commit is contained in:
parent
75819fafd8
commit
b9ffafbfcc
@ -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++) { \
|
||||
|
Loading…
Reference in New Issue
Block a user