[vlc-commits] PS: assign demux callbacks after possible fail

Jean-Baptiste Kempf git at videolan.org
Mon Jul 21 01:07:55 CEST 2014


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Jul 20 21:37:40 2014 +0200| [b552c61c3039ffbf73f632c1fc9e6c31727b3b22] | committer: Jean-Baptiste Kempf

PS: assign demux callbacks after possible fail

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

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

diff --git a/modules/demux/ps.c b/modules/demux/ps.c
index 361d529..4126a97 100644
--- a/modules/demux/ps.c
+++ b/modules/demux/ps.c
@@ -127,11 +127,12 @@ static int OpenCommon( vlc_object_t *p_this, bool b_force )
     }
 
     /* Fill p_demux field */
-    p_demux->pf_demux = Demux;
-    p_demux->pf_control = Control;
     p_demux->p_sys = p_sys = malloc( sizeof( demux_sys_t ) );
     if( !p_sys ) return VLC_ENOMEM;
 
+    p_demux->pf_demux = Demux;
+    p_demux->pf_control = Control;
+
     /* Init p_sys */
     p_sys->i_mux_rate = 0;
     p_sys->i_scr      = -1;



More information about the vlc-commits mailing list