[vlc-commits] xa: check ES

Rémi Denis-Courmont git at videolan.org
Thu May 3 10:59:47 CEST 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu May  3 11:58:57 2018 +0300| [eea64f8d78474f806ab0b41cba5db4aa8f194cc3] | committer: Rémi Denis-Courmont

xa: check ES

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

 modules/demux/xa.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/demux/xa.c b/modules/demux/xa.c
index 655cb9512a..b62c04d9bd 100644
--- a/modules/demux/xa.c
+++ b/modules/demux/xa.c
@@ -142,6 +142,8 @@ static int Open( vlc_object_t * p_this )
         return VLC_EGENERIC;
 
     p_sys->p_es = es_out_Add( p_demux->out, &fmt );
+    if( unlikely(p_sys->p_es == NULL) )
+        return VLC_ENOMEM;
 
     date_Init( &p_sys->pts, fmt.audio.i_rate, 1 );
     date_Set( &p_sys->pts, VLC_TS_0 );



More information about the vlc-commits mailing list