diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2021-07-09 15:20:47 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2021-09-12 11:22:04 +0200 |
commit | e4f7328d51505b55834eeecc8fbefb9147247a75 (patch) | |
tree | 7209739818282936d63ee2154873ac81ae1c5d33 | |
parent | a6f5191f2ecbfd25f4ffbb6ad14136e34d97cacd (diff) | |
download | ffmpeg-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.c | 4 |
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; |