[vlc-commits] voc: fix callback init order

Rémi Denis-Courmont git at videolan.org
Thu May 3 14:28:22 CEST 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu May  3 12:02:40 2018 +0300| [0fb43ae1a3c189961a3dca60262bf5d91347ef2f] | committer: Rémi Denis-Courmont

voc: fix callback init order

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

 modules/demux/voc.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/modules/demux/voc.c b/modules/demux/voc.c
index 6a00758a3a..b450228bee 100644
--- a/modules/demux/voc.c
+++ b/modules/demux/voc.c
@@ -108,8 +108,6 @@ static int Open( vlc_object_t * p_this )
     if( vlc_stream_Read( p_demux->s, NULL, i_data_offset ) < i_data_offset )
         return VLC_EGENERIC;
 
-    p_demux->pf_demux   = Demux;
-    p_demux->pf_control = Control;
     p_demux->p_sys      = p_sys = malloc( sizeof( demux_sys_t ) );
     if( p_sys == NULL )
         return VLC_ENOMEM;
@@ -122,11 +120,12 @@ static int Open( vlc_object_t * p_this )
     date_Set( &p_sys->pts, 1 );
 
     es_format_Init( &p_sys->fmt, AUDIO_ES, 0 );
+    p_demux->pf_demux = Demux;
+    p_demux->pf_control = Control;
 
     return VLC_SUCCESS;
 }
 
-
 static int fmtcmp( es_format_t *ofmt, es_format_t *nfmt )
 {
     return (ofmt->audio.i_bitspersample != nfmt->audio.i_bitspersample)



More information about the vlc-commits mailing list