aboutsummaryrefslogtreecommitdiffstats
path: root/libswscale
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-07-09 15:20:47 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2021-10-09 22:02:21 +0200
commitf5706ceea8c993f9a7a3e057dd60950516d336eb (patch)
tree4a113a145a9c4d876f747cf9b1b3fa2ec699dfe5 /libswscale
parentf596962a33626a9da0ea4400178fb2a1c9445b35 (diff)
downloadffmpeg-f5706ceea8c993f9a7a3e057dd60950516d336eb.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>
Diffstat (limited to 'libswscale')
-rw-r--r--libswscale/slice.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libswscale/slice.c b/libswscale/slice.c
index f0e621b057..895fc74016 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;