Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-07-09 16:20:47 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2021-09-12 12:22:04 +0300
commite4f7328d51505b55834eeecc8fbefb9147247a75 (patch)
tree7209739818282936d63ee2154873ac81ae1c5d33 /libswscale
parenta6f5191f2ecbfd25f4ffbb6ad14136e34d97cacd (diff)
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 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;