[vlc-commits] sout: transcode: set default RGB masks

Francois Cartegnie git at videolan.org
Tue Sep 25 16:35:03 CEST 2018


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Sep 25 16:03:39 2018 +0200| [1939d0f81cb046a17403222a3da6e539b292f6fe] | committer: Francois Cartegnie

sout: transcode: set default RGB masks

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

 modules/stream_out/transcode/encoder/video.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/modules/stream_out/transcode/encoder/video.c b/modules/stream_out/transcode/encoder/video.c
index 0b84cb8d57..cfdaf655a3 100644
--- a/modules/stream_out/transcode/encoder/video.c
+++ b/modules/stream_out/transcode/encoder/video.c
@@ -240,6 +240,10 @@ void transcode_encoder_video_configure( vlc_object_t *p_obj,
     p_enc_out->primaries = p_src->primaries;
     p_enc_out->b_color_range_full = p_src->b_color_range_full;
 
+     /* set masks when RGB */
+    video_format_FixRgb(&p_enc->p_encoder->fmt_in.video);
+    video_format_FixRgb(&p_enc->p_encoder->fmt_out.video);
+
     if ( p_cfg->psz_lang )
     {
         free( p_enc->p_encoder->fmt_in.psz_language );
@@ -311,6 +315,7 @@ int transcode_encoder_video_test( vlc_object_t *p_obj,
 
     /* output our requested format */
     es_format_Copy( p_enc_wanted_in, &p_encoder->fmt_in );
+    video_format_FixRgb( &p_enc_wanted_in->video ); /* set masks when RGB */
 
     es_format_Clean( &p_encoder->fmt_in );
     es_format_Clean( &p_encoder->fmt_out );



More information about the vlc-commits mailing list