Thanks for the help.<br><br>I change my code to this:<br><br>libvlc_exception_t exception;<br>libvlc_exception_init( &exception );<br>libvlc_instance_t *p_i1 = libvlc_new( i_argc , ppsz_argv2, &exception );<br><br>
if (p_i1 == NULL) {<br>     printf ("Instance creation failed" );  // I don't see this gets print...<br>}<br><br>But 'vlc' does not get start either.<br>This is my argument to libvlc_new:<br><br>      char *ppsz_argv2[] = { "./vlc" , 
<br>                  "-I"<br>                 "dummy",<br>                 "test.flv",<br>                 "--sout",<br> "#transcode{vcodec=mp4v,vb=400}:rtp{dst=<a href="http://135.23.52.1">
135.23.52.1</a>,port-video=3342}" }<br><br>The above argument works for my 'old' way, i.e. this:<br><br>int  i_ret = VLC_Create();                 <br>i_ret = VLC_Init( 0, i_argc, ppsz_argv2 );
<br> i_ret = VLC_AddIntf( 0, NULL, VLC_TRUE, VLC_TRUE );<br><br>Thank you for any help.<br><br><br><br><br><br><div><span class="gmail_quote">On 6/12/07, <b class="gmail_sendername">Rémi Denis-Courmont</b> <<a href="mailto:rem@videolan.org">
rem@videolan.org</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">        Hello,<br><br>Le mardi 12 juin 2007, Herman Schultz a écrit :
<br>> I am trying to embed&invoke VLC in my c application.<br>><br>> I invoke VLC like this:<br>> // i_argc is an int<br>> // ppsz_argv2  is char* ppsz_argv2[]<br>><br>> int  i_ret = VLC_Create();
<br>> i_ret = VLC_Init( 0, i_argc, ppsz_argv2 );<br>> i_ret = VLC_AddIntf( 0, NULL, VLC_TRUE, VLC_TRUE );<br>><br>> It works the first time when I do this.<br>> But when I do that the same i_argc, ppsz_arg2[] the second time, I
<br>> get an segmentation inside VLC_Init().<br>><br>> Can you please tell me why is there? Or if that is the right way to<br>> embed/invoke VLC in my own application.<br><br>There are two reasons why they crashes:
<br>The bad reason is that VLC 0.8.6 is not quite multi-instance-safe yet;<br>we are trying to solve this in upcoming version 0.9.0 but we would need<br>people to test this seriously.<br><br>The good reason is that the "VLC" API (as used in src/vlc.c) uses main
<br>VLC object number "0". Given object numbers are shared across a<br>process, there cannot be two VLC instance using object number 0. In<br>other word, without some changes, the "VLC" API cannot be used to spawn
<br>more than one instance at a time.<br><br>*However*, as Pierre pointed out, the newer LibVLC media control API<br>should work fine.<br><br>--<br>Rémi Denis-Courmont<br><a href="http://www.remlab.net/">http://www.remlab.net/
</a><br><br></blockquote></div><br>