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-10-23 00:15:59 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2021-10-24 17:54:36 +0300
commitc7699f95bb00cd7835aca4452d83320e42550a1d (patch)
tree1ab33f4880ef567a36e2f8938a4b5d21575d1771 /libswscale/utils.c
parent9df3f147f5a1c11230f3b82fed9524a3ad14a7ae (diff)
swscale/utils: Set all threads to the same colorspace even on failure
Fixes: ./ffplay dav.y4m -vf "scale=hd1080:threads=4" Found-by: Paul Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libswscale/utils.c')
-rw-r--r--libswscale/utils.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c
index 367b0ea501..3752c3ec38 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -874,15 +874,16 @@ int sws_setColorspaceDetails(struct SwsContext *c, const int inv_table[4],
int need_reinit = 0;
if (c->nb_slice_ctx) {
+ int parent_ret = 0;
for (int i = 0; i < c->nb_slice_ctx; i++) {
int ret = sws_setColorspaceDetails(c->slice_ctx[i], inv_table,
srcRange, table, dstRange,
brightness, contrast, saturation);
if (ret < 0)
- return ret;
+ parent_ret = ret;
}
- return 0;
+ return parent_ret;
}
handle_formats(c);