[vlc-commits] decoder: forward the source colorimetry if the decoder doesn't set it
Steve Lhomme
git at videolan.org
Mon Feb 18 16:11:29 CET 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Feb 18 16:04:55 2019 +0100| [5ae9e2196c1543635e356970af4e2afc3663f627] | committer: Steve Lhomme
decoder: forward the source colorimetry if the decoder doesn't set it
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5ae9e2196c1543635e356970af4e2afc3663f627
---
src/input/decoder_helpers.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/input/decoder_helpers.c b/src/input/decoder_helpers.c
index 315cd1d22c..96f78cf628 100644
--- a/src/input/decoder_helpers.c
+++ b/src/input/decoder_helpers.c
@@ -80,6 +80,17 @@ int decoder_UpdateVideoFormat( decoder_t *dec )
dec->cbs->video.format_update == NULL) )
return -1;
+ if ( dec->fmt_in.video.color_range != COLOR_RANGE_UNDEF )
+ dec->fmt_out.video.color_range = dec->fmt_in.video.color_range;
+ if ( dec->fmt_in.video.space != COLOR_SPACE_UNDEF )
+ dec->fmt_out.video.space = dec->fmt_in.video.space;
+ if ( dec->fmt_in.video.transfer != TRANSFER_FUNC_UNDEF )
+ dec->fmt_out.video.transfer = dec->fmt_in.video.transfer;
+ if ( dec->fmt_in.video.primaries != COLOR_PRIMARIES_UNDEF )
+ dec->fmt_out.video.primaries = dec->fmt_in.video.primaries;
+ if ( dec->fmt_in.video.chroma_location != CHROMA_LOCATION_UNDEF )
+ dec->fmt_out.video.chroma_location = dec->fmt_in.video.chroma_location;
+
return dec->cbs->video.format_update( dec );
}
More information about the vlc-commits
mailing list