[vlc-commits] mosaic_bridge: clean the output video_format_t usage

Steve Lhomme git at videolan.org
Fri Feb 8 14:00:42 CET 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Feb  8 11:49:23 2019 +0100| [9c8b6683e359c641e4a81ec583a4bbaac052513a] | committer: Steve Lhomme

mosaic_bridge: clean the output video_format_t usage

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

 modules/stream_out/mosaic_bridge.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/modules/stream_out/mosaic_bridge.c b/modules/stream_out/mosaic_bridge.c
index 7c0b8b041c..33c383496a 100644
--- a/modules/stream_out/mosaic_bridge.c
+++ b/modules/stream_out/mosaic_bridge.c
@@ -497,13 +497,7 @@ static void decoder_queue_video( decoder_t *p_dec, picture_t *p_pic )
     {
         video_format_t fmt_out;
 
-        memset( &fmt_out, 0, sizeof(video_format_t) );
-
-
-        if( p_sys->i_chroma )
-            fmt_out.i_chroma = p_sys->i_chroma;
-        else
-            fmt_out.i_chroma = VLC_CODEC_I420;
+        video_format_Init( &fmt_out, p_sys->i_chroma ? p_sys->i_chroma : VLC_CODEC_I420 );
 
         const unsigned i_fmt_in_aspect =
             (int64_t)VOUT_ASPECT_FACTOR *
@@ -533,6 +527,7 @@ static void decoder_queue_video( decoder_t *p_dec, picture_t *p_pic )
 
         p_new_pic = image_Convert( p_sys->p_image,
                                    p_pic, p_fmt_in, &fmt_out );
+        video_format_Clean( &fmt_out );
         if( p_new_pic == NULL )
         {
             msg_Err( p_stream, "image conversion failed" );



More information about the vlc-commits mailing list