aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-07-09 15:20:47 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2021-09-12 11:22:04 +0200
commite4f7328d51505b55834eeecc8fbefb9147247a75 (patch)
tree7209739818282936d63ee2154873ac81ae1c5d33
parenta6f5191f2ecbfd25f4ffbb6ad14136e34d97cacd (diff)
downloadffmpeg-e4f7328d51505b55834eeecc8fbefb9147247a75.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 6599f88373..f242c04a40 100644
--- a/libswscale/slice.c
+++ b/libswscale/slice.c
@@ -286,8 +286,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;