[FFmpeg-cvslog] fftools/ffmpeg_filter: fail on ifilter_alloc() failure
Anton Khirnov
git at videolan.org
Thu Nov 9 12:29:58 EET 2023
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Sat Nov 4 07:53:40 2023 +0100| [5db07311a073a7ce7f2ea72bd80049403f3f7589] | committer: Anton Khirnov
fftools/ffmpeg_filter: fail on ifilter_alloc() failure
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5db07311a073a7ce7f2ea72bd80049403f3f7589
---
fftools/ffmpeg_filter.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
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;
More information about the ffmpeg-cvslog
mailing list