[vlc-devel] [PATCH 6/6] transcode: video: assert chroma=codec
Alexandre Janniaux
ajanni at videolabs.io
Tue Jun 9 18:44:00 CEST 2020
...instead of setting it, which might raise issues as soon as i_chroma
has been set instead of i_codec, and hide case in which i_codec has not
been set to the same value as i_chroma.
---
modules/stream_out/transcode/video.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/modules/stream_out/transcode/video.c b/modules/stream_out/transcode/video.c
index e94588c978..54ec31766a 100644
--- a/modules/stream_out/transcode/video.c
+++ b/modules/stream_out/transcode/video.c
@@ -141,11 +141,10 @@ static picture_t *video_new_buffer_encoder( transcode_encoder_t *p_enc )
static picture_t *transcode_video_filter_buffer_new( filter_t *p_filter )
{
- p_filter->fmt_out.video.i_chroma = p_filter->fmt_out.i_codec;
+ assert(p_filter->fmt_out.video.i_chroma == p_filter->fmt_out.i_codec);
return picture_NewFromFormat( &p_filter->fmt_out.video );
}
-
static void decoder_queue_video( decoder_t *p_dec, picture_t *p_pic )
{
struct decoder_owner *p_owner = dec_get_owner( p_dec );
--
2.27.0
More information about the vlc-devel
mailing list