diff mbox series

[FFmpeg-devel,04/24] sws: return an error code on invalid parameters to sws_scale()

Message ID 20210531075515.19544-4-anton@khirnov.net
State Accepted
Commit e355af9be9756e81e6e6d5a51cfc2853c1e5001e
Headers show
Series [FFmpeg-devel,01/24] sws: remove unnecessary braces | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Anton Khirnov May 31, 2021, 7:54 a.m. UTC
---
 libswscale/swscale.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael Niedermayer June 1, 2021, 10:32 a.m. UTC | #1
On Mon, May 31, 2021 at 09:54:55AM +0200, Anton Khirnov wrote:
> ---
>  libswscale/swscale.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

ok

[...]
diff mbox series

Patch

diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index 05e716dcc9..9743c56295 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -833,7 +833,7 @@  int attribute_align_arg sws_scale(struct SwsContext *c,
 
     if (!srcStride || !dstStride || !dst || !srcSlice) {
         av_log(c, AV_LOG_ERROR, "One of the input parameters to sws_scale() is NULL, please check the calling code\n");
-        return 0;
+        return AVERROR(EINVAL);
     }
 
     for (i=0; i<4; i++) {