<html><head></head><body>If you actually want to clean this up, then move i_codec into the anonymous union.<br><br>(This will also affect subs and audio for better or worse.)<br><br><div class="gmail_quote">Le 19 février 2019 11:38:17 GMT+02:00, Steve Lhomme <robux4@ycbcr.xyz> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">This is odd but it's done everywhere.<br><br>We also copy it in the original output video_format as it was done in most cases.<hr> modules/stream_out/mosaic_bridge.c   | 3 ---<br> modules/stream_out/sdi/SDIStream.cpp | 3 ---<br> src/input/decoder.c                  | 1 -<br> src/input/decoder_helpers.c          | 2 ++<br> src/misc/image.c                     | 1 -<br> 5 files changed, 2 insertions(+), 8 deletions(-)<br><br>diff --git a/modules/stream_out/mosaic_bridge.c b/modules/stream_out/mosaic_bridge.c<br>index 9608422748..15e8f6fbe4 100644<br>--- a/modules/stream_out/mosaic_bridge.c<br>+++ b/modules/stream_out/mosaic_bridge.c<br>@@ -613,9 +613,6 @@ static void video_update_format( video_format_t *video, es_format_t *fmt_out )<br> <br>         *video = fmt_out->video;<br>     }<br>-<br>-    /* */<br>-    fmt_out->video.i_chroma = fmt_out->i_codec;<br> }<br> <br> /**********************************************************************<br>diff --git a/modules/stream_out/sdi/SDIStream.cpp b/modules/stream_out/sdi/SDIStream.cpp<br>index 5202bd331c..f525b5700d 100644<br>--- a/modules/stream_out/sdi/SDIStream.cpp<br>+++ b/modules/stream_out/sdi/SDIStream.cpp<br>@@ -325,9 +325,6 @@ int VideoDecodedStream::VideoDecCallback_update_format(decoder_t *p_dec)<br>     struct decoder_owner *p_owner;<br>     p_owner = container_of(p_dec, struct decoder_owner, dec);<br> <br>-    /* fixup */<br>-    p_dec->fmt_out.video.i_chroma = p_dec->fmt_out.i_codec;<br>-<br>     es_format_Clean(&p_owner->last_fmt_update);<br>     es_format_Copy(&p_owner->last_fmt_update, &p_dec->fmt_out);<br> <br>diff --git a/src/input/decoder.c b/src/input/decoder.c<br>index 503e89d0b4..16e88702b7 100644<br>--- a/src/input/decoder.c<br>+++ b/src/input/decoder.c<br>@@ -455,7 +455,6 @@ static int vout_update_format( decoder_t *p_dec )<br>         }<br> <br>         video_format_t fmt = p_dec->fmt_out.video;<br>-        fmt.i_chroma = p_dec->fmt_out.i_codec;<br> <br>         if( vlc_fourcc_IsYUV( fmt.i_chroma ) )<br>         {<br>diff --git a/src/input/decoder_helpers.c b/src/input/decoder_helpers.c<br>index e532aa450e..b738525b1e 100644<br>--- a/src/input/decoder_helpers.c<br>+++ b/src/input/decoder_helpers.c<br>@@ -94,6 +94,8 @@ int decoder_UpdateVideoFormat( decoder_t *dec )<br> <br>     video_format_AdjustColorSpace( &fmt_out );<br> <br>+    dec->fmt_out.video.i_chroma = fmt_out.i_chroma = dec->fmt_out.i_codec;<br>+<br>     video_format_t original = dec->fmt_out.video;<br>     dec->fmt_out.video = fmt_out;<br>     int err = dec->cbs->video.format_update( dec );<br>diff --git a/src/misc/image.c b/src/misc/image.c<br>index 52edd0ff67..0c5fb9a384 100644<br>--- a/src/misc/image.c<br>+++ b/src/misc/image.c<br>@@ -652,7 +652,6 @@ vlc_fourcc_t image_Mime2Fourcc( const char *psz_mime )<br> <br> static int video_update_format( decoder_t *p_dec )<br> {<br>-    p_dec->fmt_out.video.i_chroma = p_dec->fmt_out.i_codec;<br>     return 0;<br> }<br> </pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>