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:24:11 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2021-10-24 17:54:36 +0300
commit5f3a160b422e87e17d8fcd3aea51d478d0f05ba5 (patch)
treebc1c18c0b2b15752313bcc2e165892c8c0ae5439 /libswscale/utils.c
parentc7699f95bb00cd7835aca4452d83320e42550a1d (diff)
swscale/utils: Improve return codes of sws_setColorspaceDetails()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libswscale/utils.c')
-rw-r--r--libswscale/utils.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c
index 3752c3ec38..c726922527 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -995,7 +995,10 @@ int sws_setColorspaceDetails(struct SwsContext *c, const int inv_table[4],
0, 1 << 16, 1 << 16);
return 0;
}
- return -1;
+ //We do not support this combination currently, we need to cascade more contexts to compensate
+ if (c->cascaded_context[0] && memcmp(c->dstColorspaceTable, c->srcColorspaceTable, sizeof(int) * 4))
+ return -1; //AVERROR_PATCHWELCOME;
+ return 0;
}
if (!isYUV(c->dstFormat) && !isGray(c->dstFormat)) {