[vlc-devel] [PATCH 2/3] decoder: do video_format_AdjustColorSpace() for all formats we output

Steve Lhomme robux4 at ycbcr.xyz
Mon Feb 18 16:56:41 CET 2019


The decoder can still update after it was set after a further
decoder_UpdateVideoFormat() call.

So no video format without colorimetry can get out of the decoder.
---
 src/input/decoder_helpers.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/input/decoder_helpers.c b/src/input/decoder_helpers.c
index a019a540df..e19e04db1b 100644
--- a/src/input/decoder_helpers.c
+++ b/src/input/decoder_helpers.c
@@ -95,6 +95,8 @@ int decoder_UpdateVideoFormat( decoder_t *dec )
          dec->fmt_out.video.chroma_location != CHROMA_LOCATION_UNDEF )
         dec->fmt_out.video.chroma_location = dec->fmt_in.video.chroma_location;
 
+    video_format_AdjustColorSpace( &dec->fmt_out.video );
+
     return dec->cbs->video.format_update( dec );
 }
 
-- 
2.17.1



More information about the vlc-devel mailing list