[vlc-devel] [PATCH 04/13] decoder: copy the ES codec into the chroma
Steve Lhomme
robux4 at ycbcr.xyz
Tue Feb 19 10:38:17 CET 2019
This is odd but it's done everywhere.
We also copy it in the original output video_format as it was done in most cases.
---
modules/stream_out/mosaic_bridge.c | 3 ---
modules/stream_out/sdi/SDIStream.cpp | 3 ---
src/input/decoder.c | 1 -
src/input/decoder_helpers.c | 2 ++
src/misc/image.c | 1 -
5 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/modules/stream_out/mosaic_bridge.c b/modules/stream_out/mosaic_bridge.c
index 9608422748..15e8f6fbe4 100644
--- a/modules/stream_out/mosaic_bridge.c
+++ b/modules/stream_out/mosaic_bridge.c
@@ -613,9 +613,6 @@ static void video_update_format( video_format_t *video, es_format_t *fmt_out )
*video = fmt_out->video;
}
-
- /* */
- fmt_out->video.i_chroma = fmt_out->i_codec;
}
/**********************************************************************
diff --git a/modules/stream_out/sdi/SDIStream.cpp b/modules/stream_out/sdi/SDIStream.cpp
index 5202bd331c..f525b5700d 100644
--- a/modules/stream_out/sdi/SDIStream.cpp
+++ b/modules/stream_out/sdi/SDIStream.cpp
@@ -325,9 +325,6 @@ int VideoDecodedStream::VideoDecCallback_update_format(decoder_t *p_dec)
struct decoder_owner *p_owner;
p_owner = container_of(p_dec, struct decoder_owner, dec);
- /* fixup */
- p_dec->fmt_out.video.i_chroma = p_dec->fmt_out.i_codec;
-
es_format_Clean(&p_owner->last_fmt_update);
es_format_Copy(&p_owner->last_fmt_update, &p_dec->fmt_out);
diff --git a/src/input/decoder.c b/src/input/decoder.c
index 503e89d0b4..16e88702b7 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -455,7 +455,6 @@ static int vout_update_format( decoder_t *p_dec )
}
video_format_t fmt = p_dec->fmt_out.video;
- fmt.i_chroma = p_dec->fmt_out.i_codec;
if( vlc_fourcc_IsYUV( fmt.i_chroma ) )
{
diff --git a/src/input/decoder_helpers.c b/src/input/decoder_helpers.c
index e532aa450e..b738525b1e 100644
--- a/src/input/decoder_helpers.c
+++ b/src/input/decoder_helpers.c
@@ -94,6 +94,8 @@ int decoder_UpdateVideoFormat( decoder_t *dec )
video_format_AdjustColorSpace( &fmt_out );
+ dec->fmt_out.video.i_chroma = fmt_out.i_chroma = dec->fmt_out.i_codec;
+
video_format_t original = dec->fmt_out.video;
dec->fmt_out.video = fmt_out;
int err = dec->cbs->video.format_update( dec );
diff --git a/src/misc/image.c b/src/misc/image.c
index 52edd0ff67..0c5fb9a384 100644
--- a/src/misc/image.c
+++ b/src/misc/image.c
@@ -652,7 +652,6 @@ vlc_fourcc_t image_Mime2Fourcc( const char *psz_mime )
static int video_update_format( decoder_t *p_dec )
{
- p_dec->fmt_out.video.i_chroma = p_dec->fmt_out.i_codec;
return 0;
}
--
2.17.1
More information about the vlc-devel
mailing list