aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Ekström <jeebjp@gmail.com>2020-10-10 01:33:27 +0300
committerJan Ekström <jeebjp@gmail.com>2020-10-11 12:58:13 +0300
commit7ea4bcff7b038774b404bad2b9c7112a7855a088 (patch)
tree2a7fc763f43ade5f6a6ba57d999b90d4b6bc4862
parent3fe24fe23219d28edc12c5b78a19a075d948f997 (diff)
downloadffmpeg-7ea4bcff7b038774b404bad2b9c7112a7855a088.tar.gz
swscale/utils: override forced-zero formats back to full range
Fixes vf_scale outputting RGB AVFrames with limited range flagged in case either input or output specifically sets the range. This is the reverse of the logic utilized for RGB and PAL8 content in sws_setColorspaceDetails.
-rw-r--r--libswscale/utils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c
index 832c9f873c..352a8ed116 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -1013,8 +1013,8 @@ int sws_getColorspaceDetails(struct SwsContext *c, int **inv_table,
*inv_table = c->srcColorspaceTable;
*table = c->dstColorspaceTable;
- *srcRange = c->srcRange;
- *dstRange = c->dstRange;
+ *srcRange = range_override_needed(c->srcFormat) ? 1 : c->srcRange;
+ *dstRange = range_override_needed(c->dstFormat) ? 1 : c->dstRange;
*brightness = c->brightness;
*contrast = c->contrast;
*saturation = c->saturation;