[FFmpeg-devel] [PATCH] swscale/utils.c: Fix incorrect error when calling sws_setColorspaceDetails
Mark Boorer
markboo99 at gmail.com
Thu Aug 3 02:18:01 EEST 2017
Fixes: When converting yuv -> yuv and changing any of srcRange,
dstRange, brightness, contrast, or saturation the context would not be
re-initialized as required.
---
libswscale/utils.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libswscale/utils.c b/libswscale/utils.c
index 17c9967..9071d3a 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -959,6 +959,9 @@ int sws_setColorspaceDetails(struct SwsContext *c, const int inv_table[4],
srcRange, table, dstRange,
0, 1 << 16, 1 << 16);
return 0;
+ } else if (!c->cascaded_context[0] && c->srcW && c->srcH && c->dstW && c->dstH) {
+ int ret = sws_init_context(c, NULL, NULL);
+ return ret;
}
return -1;
}
--
2.9.3
More information about the ffmpeg-devel
mailing list