wav: check ES
authorRémi Denis-Courmont <remi@remlab.net>
Thu, 3 May 2018 09:01:51 +0000 (12:01 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Thu, 3 May 2018 12:25:37 +0000 (15:25 +0300)
modules/demux/wav.c

index 997ff0b..d93526f 100644 (file)
@@ -424,6 +424,8 @@ static int Open( vlc_object_t * p_this )
     }
 
     p_sys->p_es = es_out_Add( p_demux->out, &p_sys->fmt );
+    if( unlikely(p_sys->p_es == NULL) )
+        goto error;
 
     date_Init( &p_sys->pts, p_sys->fmt.audio.i_rate, 1 );
     date_Set( &p_sys->pts, 1 );