[vlc-devel] libvlc_media_add_option problem in 2.0.3

LANGLOIS Olivier PIS -EXT olivier.pis.langlois at transport.alstom.com
Thu Aug 30 02:57:36 CEST 2012

I was using

                libvlc_media_add_option(lMedia, "video-x=0");
                libvlc_media_add_option(lMedia, "video-y=0");
                libvlc_media_add_option(lMedia, "width=320");
                libvlc_media_add_option(lMedia, "height=200");

and on any video, the source format was setting my window properties. To fix the problem, I did modify src/input/input.c, function Create():

    /* Parse input options */
    vlc_mutex_lock( &p_item->lock );
    assert( (int)p_item->optflagc == p_item->i_options );
    for( i = 0; i < p_item->i_options; i++ )
        msg_Dbg( p_input, "process option '%s'", p_item->ppsz_options[i]);
        var_OptionParse( VLC_OBJECT(p_input), p_item->ppsz_options[i],
                         !!(p_item->optflagv[i] & VLC_INPUT_OPTION_TRUSTED) );
        if( p_resource )
                                       !!(p_item->optflagv[i] & VLC_INPUT_OPTION_TRUSTED) );
    vlc_mutex_unlock( &p_item->lock );

in resource.c:

void input_resource_OptionParse( input_resource_t *p_resource, const char *option, bool trusted )
    var_OptionParse( p_resource->p_parent, option, trusted );

The reason why this is needed is because media_player is now creating the input_resource object.

Ihope this helps!


CONFIDENTIALITY : This e-mail and any attachments are confidential and may be privileged. If you are not a named recipient, please notify the sender immediately and do not disclose the contents to another person, use it for any purpose or store or copy the information in any medium.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20120830/4c15c704/attachment.html>

More information about the vlc-devel mailing list