aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-07-09 15:20:47 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2021-10-17 21:34:53 +0200
commit764de1f6d8ff50d4d22f08fdff62cb0655900f15 (patch)
treed55e5fa318362e7645831176c465f286cdf7ee64
parentf9d94e32e558c88afc115393e8180f2abbf45667 (diff)
downloadffmpeg-764de1f6d8ff50d4d22f08fdff62cb0655900f15.tar.gz
swscale/slice: Fix wrong return on error
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 7874d40f10cca922797a8da14189a53ee52f0156) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libswscale/slice.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libswscale/slice.c b/libswscale/slice.c
index c47d844987..7b92eced46 100644
--- a/libswscale/slice.c
+++ b/libswscale/slice.c
@@ -243,8 +243,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;