mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-05 06:13:43 +00: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) \
|
#define SET_COMMON_FORMATS(ctx, fmts, in_fmts, out_fmts, ref, list) \
|
||||||
{ \
|
if (fmts) { \
|
||||||
int count = 0, i; \
|
int count = 0, i; \
|
||||||
\
|
\
|
||||||
for (i = 0; i < ctx->nb_inputs; i++) { \
|
for (i = 0; i < ctx->nb_inputs; i++) { \
|
||||||
|
Loading…
Reference in New Issue
Block a user