diff options
author | Anton Khirnov <anton@khirnov.net> | 2023-11-04 07:53:40 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2023-11-09 11:25:17 +0100 |
commit | 5db07311a073a7ce7f2ea72bd80049403f3f7589 (patch) | |
tree | 032e491abce0bc0e9d78f79a66dc64868ddc4943 /fftools | |
parent | ed0a50923a8fb36ff6535f5a87bfede41f6fac0e (diff) | |
download | ffmpeg-5db07311a073a7ce7f2ea72bd80049403f3f7589.tar.gz |
fftools/ffmpeg_filter: fail on ifilter_alloc() failure
Diffstat (limited to 'fftools')
-rw-r--r-- | fftools/ffmpeg_filter.c | 8 |
1 files changed, 7 insertions, 1 deletions
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; |