[vlc-commits] decoder: factorize the output colorimetry fixup

Steve Lhomme git at videolan.org
Mon Nov 4 10:42:04 CET 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Oct 28 12:54:53 2019 +0100| [69d943df3c171d2bdb211e8e98ed57c2ebdfd1df] | committer: Steve Lhomme

decoder: factorize the output colorimetry fixup

This way other decoder owner (thumbnail, transcode, etc) benefit from the same
fix in a consistent manner.

Now we clean the value directly in the dec->fmt_out whereas before it was
cleaned at the vout level and the decoder didn't know about it.

In the end if the decoder didn't write it before it would not have written it
later anyway. And if it really wants to, it can still do it later and issue an
update_format.

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

 src/input/decoder.c         | 2 --
 src/input/decoder_helpers.c | 2 ++
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/input/decoder.c b/src/input/decoder.c
index be19a64d4b..fac5177181 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -417,8 +417,6 @@ static void FixDisplayFormat(decoder_t *p_dec, video_format_t *fmt)
                 fmt->i_height++;
         }
     }
-
-    video_format_AdjustColorSpace( fmt );
 }
 
 static int CreateVoutIfNeeded(struct decoder_owner *, vout_thread_t **, enum vlc_vout_order *, vlc_decoder_device **);
diff --git a/src/input/decoder_helpers.c b/src/input/decoder_helpers.c
index df2f0667ba..8f98d79927 100644
--- a/src/input/decoder_helpers.c
+++ b/src/input/decoder_helpers.c
@@ -131,6 +131,8 @@ int decoder_UpdateVideoOutput( decoder_t *dec, vlc_video_context *vctx_out )
         }
     }
 
+    video_format_AdjustColorSpace( &dec->fmt_out.video );
+
     if (dec->cbs->video.format_update == NULL)
         return 0;
 



More information about the vlc-commits mailing list