This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 6c613ea15dbd16c4e63d5e5cade46725ae2c4b27 Author: Ramiro Polla <[email protected]> AuthorDate: Mon Sep 28 17:10:11 2026 +0200 Commit: Niklas Haas <[email protected]> CommitDate: Tue Sep 29 18:54:39 2026 +0000 swscale/tests/swscale: return enomem when allocation fails Prefer explicitly setting ret on errors instead of relying on the default value being -1. --- libswscale/tests/swscale.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libswscale/tests/swscale.c b/libswscale/tests/swscale.c index 0e4222e614..c21ba7547a 100644 --- a/libswscale/tests/swscale.c +++ b/libswscale/tests/swscale.c @@ -1152,16 +1152,20 @@ int main(int argc, char **argv) sws_ref_src = sws_alloc_context(); sws_src_dst = sws_alloc_context(); sws_dst_out = sws_alloc_context(); - if (!sws_ref_src || !sws_src_dst || !sws_dst_out) + if (!sws_ref_src || !sws_src_dst || !sws_dst_out) { + ret = AVERROR(ENOMEM); goto error; + } sws_ref_src->flags = SWS_BILINEAR | SWS_BITEXACT | SWS_ACCURATE_RND; sws_dst_out->flags = SWS_BILINEAR | SWS_BITEXACT | SWS_ACCURATE_RND; sws_ref_src->backends = SWS_BACKEND_ALL; sws_dst_out->backends = SWS_BACKEND_ALL; ref = av_frame_alloc(); - if (!ref) + if (!ref) { + ret = AVERROR(ENOMEM); goto error; + } ref->width = opts.w; ref->height = opts.h; ref->format = AV_PIX_FMT_YUVA444P; -- To stop receiving notification emails like this one, please contact [email protected]. _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
