[vlc-commits] avformat: set pf_* after everything else in init

Ilkka Ollakka git at videolan.org
Fri Mar 15 11:09:25 CET 2013


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Thu Mar 14 12:33:17 2013 +0200| [61da5a109660bb8b433862f48cee5a196a071068] | committer: Ilkka Ollakka

avformat: set pf_* after everything else in init

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

 modules/demux/avformat/mux.c |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/modules/demux/avformat/mux.c b/modules/demux/avformat/mux.c
index d15efe9..a8c4519 100644
--- a/modules/demux/avformat/mux.c
+++ b/modules/demux/avformat/mux.c
@@ -106,11 +106,6 @@ int OpenMux( vlc_object_t *p_this )
       return VLC_EGENERIC;
     }
 
-    /* Fill p_mux fields */
-    p_mux->pf_control   = Control;
-    p_mux->pf_addstream = AddStream;
-    p_mux->pf_delstream = DelStream;
-    p_mux->pf_mux       = Mux;
     p_mux->p_sys = p_sys = malloc( sizeof( sout_mux_sys_t ) );
     if( !p_sys )
         return VLC_ENOMEM;
@@ -136,6 +131,12 @@ int OpenMux( vlc_object_t *p_this )
     p_sys->b_error = false;
     p_sys->i_initial_dts = 0;
 
+    /* Fill p_mux fields */
+    p_mux->pf_control   = Control;
+    p_mux->pf_addstream = AddStream;
+    p_mux->pf_delstream = DelStream;
+    p_mux->pf_mux       = Mux;
+
     return VLC_SUCCESS;
 }
 



More information about the vlc-commits mailing list