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

Steve Lhomme robux4 at ycbcr.xyz
Wed Jun 5 17:50:26 CEST 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 d42ee64cb5..853ccc14f6 100644
--- a/src/input/decoder_helpers.c
+++ b/src/input/decoder_helpers.c
@@ -93,6 +93,8 @@ int decoder_UpdateVideoFormat( decoder_t *dec )
     if ( fmt_out.chroma_location == CHROMA_LOCATION_UNDEF )
         fmt_out.chroma_location = dec->fmt_in.video.chroma_location;
 
+    video_format_AdjustColorSpace( &fmt_out );
+
     video_format_t original = dec->fmt_out.video;
     dec->fmt_out.video = fmt_out;
     int err = dec->cbs->video.format_update( dec );
-- 
2.17.1



More information about the vlc-devel mailing list