[vlc-devel] [PATCH 16/18] decoder: factorize the output colorimetry fixup
Steve Lhomme
robux4 at ycbcr.xyz
Mon Oct 28 13:41:33 CET 2019
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.
---
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 be19a64d4bd..fac5177181d 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 df2f0667baf..8f98d799271 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;
--
2.17.1
More information about the vlc-devel
mailing list