[vlc-commits] png: set the colorspace and primaries to sRGB as well

Steve Lhomme git at videolan.org
Tue Jun 4 08:32:46 CEST 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Jun  3 14:13:03 2019 +0200| [3275083c5e6aeac895a6fd8c76afc3c36c8f0a5e] | committer: Steve Lhomme

png: set the colorspace and primaries to sRGB as well

The transfer was already set.

If we don't do that it may be assumed to be 709 or 601 depending on
the picture dimensions.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3275083c5e6aeac895a6fd8c76afc3c36c8f0a5e
---

 modules/codec/png.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/codec/png.c b/modules/codec/png.c
index 402459d8e1..07ef26d346 100644
--- a/modules/codec/png.c
+++ b/modules/codec/png.c
@@ -124,7 +124,9 @@ static int OpenDecoder( vlc_object_t *p_this )
 
     /* Set output properties */
     p_dec->fmt_out.i_codec = VLC_CODEC_RGBA;
-    p_dec->fmt_out.video.transfer = TRANSFER_FUNC_SRGB;
+    p_dec->fmt_out.video.transfer  = TRANSFER_FUNC_SRGB;
+    p_dec->fmt_out.video.space     = COLOR_SPACE_SRGB;
+    p_dec->fmt_out.video.primaries = COLOR_PRIMARIES_SRGB;
     p_dec->fmt_out.video.color_range = COLOR_RANGE_FULL;
 
     /* Set callbacks */



More information about the vlc-commits mailing list