Commit 9cca21d4 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont
Browse files

lib: fix wrong user-agent and http-user-agent values at start

VLC main() initializes the values too late for interfaces and playlist.
parent 0ad07a9d
......@@ -69,8 +69,6 @@ libvlc_instance_t * libvlc_new( int argc, const char *const *argv )
p_new->ref_count = 1;
p_new->p_callback_list = NULL;
var_Create( p_libvlc_int, "http-user-agent",
return p_new;
......@@ -385,8 +385,16 @@ dbus_out:
/* some default internal settings */
var_Create( p_libvlc, "window", VLC_VAR_STRING );
/* NOTE: Because the playlist and interfaces start before this function
* returns control to the application (DESIGN BUG!), all these variables
* must be created (in place of libvlc_new()) and set to VLC defaults
* (in place of VLC main()) *here*. */
var_Create( p_libvlc, "user-agent", VLC_VAR_STRING );
var_SetString( p_libvlc, "user-agent", "(LibVLC "VERSION")" );
var_SetString( p_libvlc, "user-agent",
"VLC media player (LibVLC "VERSION")" );
var_Create( p_libvlc, "http-user-agent", VLC_VAR_STRING );
var_SetString( p_libvlc, "http-user-agent",
/* System specific configuration */
system_Configure( p_libvlc, i_argc - vlc_optind, ppsz_argv + vlc_optind );
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment