diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2021-07-09 15:20:47 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2021-09-08 21:31:50 +0200 |
commit | b21120a92494b88f7b5d65c2f3d24aa25846cb96 (patch) | |
tree | 166e97c5cc9917a8d3cd76890ea5ce54c89ab385 | |
parent | 6a5d7fd8ad1cf420fc290998632973198e4f741b (diff) | |
download | ffmpeg-b21120a92494b88f7b5d65c2f3d24aa25846cb96.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.c | 4 |
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; |