Message ID | 20231107125835.25827-2-anton@khirnov.net |
---|---|
State | Accepted |
Commit | 5db07311a073a7ce7f2ea72bd80049403f3f7589 |
Headers | show |
Series | [FFmpeg-devel,1/4] fftools/cmdutils: only set array size after allocation succeeded | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index c738fc3397..c8920d9234 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -905,8 +905,14 @@ int fg_create(FilterGraph **pfg, char *graph_desc) for (AVFilterInOut *cur = inputs; cur; cur = cur->next) { InputFilter *const ifilter = ifilter_alloc(fg); - InputFilterPriv *ifp = ifp_from_ifilter(ifilter); + InputFilterPriv *ifp; + if (!ifilter) { + ret = AVERROR(ENOMEM); + goto fail; + } + + ifp = ifp_from_ifilter(ifilter); ifp->linklabel = cur->name; cur->name = NULL;