Message ID | 20240505144010.3700-1-jamrial@gmail.com |
---|---|
State | Accepted |
Commit | ccf395e8bde3e5d6b96be3e0ba25e2d162d4117e |
Headers | show |
Series | [FFmpeg-devel,1/2] avfilter/framesync: reset nb_in on allocation failure | expand |
Context | Check | Description |
---|---|---|
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
diff --git a/libavfilter/framesync.c b/libavfilter/framesync.c index a691136f34..535fbe9c7c 100644 --- a/libavfilter/framesync.c +++ b/libavfilter/framesync.c @@ -95,8 +95,11 @@ int ff_framesync_init(FFFrameSync *fs, AVFilterContext *parent, unsigned nb_in) fs->nb_in = nb_in; fs->in = av_calloc(nb_in, sizeof(*fs->in)); - if (!fs->in) + if (!fs->in) { + fs->nb_in = 0; return AVERROR(ENOMEM); + } + return 0; }
Signed-off-by: James Almer <jamrial@gmail.com> --- libavfilter/framesync.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)