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

Steve Lhomme robux4 at ycbcr.xyz
Tue Feb 19 10:38:15 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 f6c21fe085..e532aa450e 100644
--- a/src/input/decoder_helpers.c
+++ b/src/input/decoder_helpers.c
@@ -92,6 +92,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