aboutsummaryrefslogtreecommitdiffstats
path: root/libswscale/slice.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-07-09 15:20:47 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2021-07-09 15:21:37 +0200
commit7874d40f10cca922797a8da14189a53ee52f0156 (patch)
treef00cb51e4b315c417b2a59ac8c7d4e2a05f4a438 /libswscale/slice.c
parenteaec4df63f98b6d2d60d2cf441de250c5f69359e (diff)
downloadffmpeg-7874d40f10cca922797a8da14189a53ee52f0156.tar.gz
swscale/slice: Fix wrong return on error
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libswscale/slice.c')
-rw-r--r--libswscale/slice.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libswscale/slice.c b/libswscale/slice.c
index 68517da00b..b185b4aa18 100644
--- a/libswscale/slice.c
+++ b/libswscale/slice.c
@@ -288,8 +288,10 @@ int ff_init_filters(SwsContext * c)
if (!c->desc)
return AVERROR(ENOMEM);
c->slice = av_mallocz_array(sizeof(SwsSlice), c->numSlice);
- if (!c->slice)
+ if (!c->slice) {
+ res = AVERROR(ENOMEM);
goto cleanup;
+ }
res = alloc_slice(&c->slice[0], c->srcFormat, c->srcH, c->chrSrcH, c->chrSrcHSubSample, c->chrSrcVSubSample, 0);
if (res < 0) goto cleanup;