[vlc-commits] codec: cvdsub: use video_format_Init/Clean

Francois Cartegnie git at videolan.org
Mon Nov 21 21:23:04 CET 2016


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Nov 21 20:32:56 2016 +0100| [0861b9b5ad9717242d151c503d9d3666418539e5] | committer: Francois Cartegnie

codec: cvdsub: use video_format_Init/Clean

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

 modules/codec/cvdsub.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/codec/cvdsub.c b/modules/codec/cvdsub.c
index 01fac3d..44269e3 100644
--- a/modules/codec/cvdsub.c
+++ b/modules/codec/cvdsub.c
@@ -511,8 +511,7 @@ static subpicture_t *DecodePacket( decoder_t *p_dec, block_t *p_data )
     p_spu->b_ephemer = true;
 
     /* Create new SPU region */
-    memset( &fmt, 0, sizeof(video_format_t) );
-    fmt.i_chroma = VLC_CODEC_YUVP;
+    video_format_Init( &fmt, VLC_CODEC_YUVP );
     fmt.i_sar_num = 1;
     fmt.i_sar_den = 1;
     fmt.i_width = fmt.i_visible_width = p_sys->i_width;
@@ -529,6 +528,7 @@ static subpicture_t *DecodePacket( decoder_t *p_dec, block_t *p_data )
     }
 
     p_region = subpicture_region_New( &fmt );
+    video_format_Clean( &fmt );
     if( !p_region )
     {
         msg_Err( p_dec, "cannot allocate SPU region" );



More information about the vlc-commits mailing list