<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">On 09 Oct 2014, at 08:15, Jeff Hoogland <<a href="mailto:JeffHoogland@linux.com">JeffHoogland@linux.com</a>> wrote:<br><div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">The</span><span style="font-family:arial,sans-serif;font-size:12.8000001907349px"> libvlc_media_add_option() keeps giving me a segfault whenever I try to call it. For example I am running:</span><div style="font-family:arial,sans-serif;font-size:12.8000001907349px"><span style="font-size:12.8000001907349px"><br></span></div><div style="font-family:arial,sans-serif;font-size:12.8000001907349px"><font face="arial, sans-serif">vlc.libvlc_media_add_option( self.player, "--network-caching 2500")<br></font><br>Where self.player is my vlc.MediaPlayer instance.</div></div></blockquote><div><br></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(0, 132, 0);">/**</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(0, 132, 0);"> * Add an option to the media.</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(0, 132, 0);"> *</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(0, 132, 0);"> * This option will be used to determine how the media_player will</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(0, 132, 0);"> * read the media. This allows to use VLC's advanced</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(0, 132, 0);"> * reading/streaming options on a per-media basis.</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(0, 132, 0);"> *</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(0, 132, 0);"> * <span style="color: #004c14">\note</span> The options are listed in 'vlc --long-help' from the command line,</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(0, 132, 0);"> * e.g. "-sout-all". Keep in mind that available options and their semantics</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(0, 132, 0);"> * vary across LibVLC versions and builds.</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(0, 132, 0);"> * <span style="color: #004c14">\warning</span> Not all options affects libvlc_media_t objects:</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(0, 132, 0);"> * Specifically, due to architectural issues most audio and video options,</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(0, 132, 0);"> * such as text renderer options, have no effects on an individual media.</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(0, 132, 0);"> * These options must be set through libvlc_new() instead.</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(0, 132, 0);"> *</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(0, 132, 0);"> * <span style="color: #004c14">\param</span> p_md the media descriptor</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(0, 132, 0);"> * <span style="color: #004c14">\param</span> psz_options the options (as a string)</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(0, 132, 0);"> */</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">LIBVLC_API <span style="color: #bb2ca2">void</span> libvlc_media_add_option(</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">                                   libvlc_media_t *p_md,</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">                                   <span style="color: #bb2ca2">const</span> <span style="color: #bb2ca2">char</span> * psz_options );</div><br></div><div>I suspect your vlc.MediaPlayer instance is of type <span style="font-family: Menlo; font-size: 11px;">libvlc_media_player_t</span>…</div><div><br></div><div>Tim</div></body></html>