X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Flibvlc.c;h=28408539fac1977888f456257e7379abd4d6fea5;hb=12ade3e3bc975d5426ba4af155b7372c31093b31;hp=96293ebb09de0b54462d1fbcc5c9dd49a80e20f0;hpb=fa4ba3ac6e157737f7ecc269377659ff1c8a3f4e;p=vlc diff --git a/src/libvlc.c b/src/libvlc.c index 96293ebb09..28408539fa 100644 --- a/src/libvlc.c +++ b/src/libvlc.c @@ -81,6 +81,7 @@ #include #include #include +#include #include "libvlc.h" @@ -761,6 +762,11 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc, var_Create( p_libvlc, "snapshot-file", VLC_VAR_STRING ); var_Create( p_libvlc, "record-file", VLC_VAR_STRING ); + /* some default internal settings */ + var_Create( p_libvlc, "window", VLC_VAR_STRING ); + var_Create( p_libvlc, "user-agent", VLC_VAR_STRING ); + var_SetString( p_libvlc, "user-agent", "(LibVLC "VERSION")" ); + /* Initialize playlist and get commandline files */ p_playlist = playlist_Create( VLC_OBJECT(p_libvlc) ); if( !p_playlist ) @@ -911,7 +917,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc, if( psz_codecs ) { char *psz_morecodecs; - if( asprintf(&psz_morecodecs, "%s,dmo,quicktime", psz_codecs) != -1 ) + if( asprintf(&psz_morecodecs, "%s,dmo", psz_codecs) != -1 ) { var_SetString( p_libvlc, "codec", psz_morecodecs); free( psz_morecodecs ); @@ -919,7 +925,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc, free( psz_codecs ); } else - var_SetString( p_libvlc, "codec", "dmo,quicktime"); + var_SetString( p_libvlc, "codec", "dmo"); } #endif @@ -1251,6 +1257,7 @@ static void Help( libvlc_int_t *p_this, char const *psz_help_name ) #ifdef WIN32 /* Pause the console because it's destroyed when we exit */ PauseConsole(); #endif + fflush( stdout ); } /***************************************************************************** @@ -1276,7 +1283,7 @@ print_help_section( const module_t *m, const module_config_t *p_item, { utf8_fprintf( stdout, RED" %s:\n"GRAY, module_gettext( m, p_item->psz_text ) ); - if( b_description && p_item->psz_longtext && *p_item->psz_longtext ) + if( b_description && p_item->psz_longtext ) utf8_fprintf( stdout, MAGENTA" %s\n"GRAY, module_gettext( m, p_item->psz_longtext ) ); } @@ -1284,7 +1291,7 @@ print_help_section( const module_t *m, const module_config_t *p_item, { utf8_fprintf( stdout, " %s:\n", module_gettext( m, p_item->psz_text ) ); - if( b_description && p_item->psz_longtext && *p_item->psz_longtext ) + if( b_description && p_item->psz_longtext ) utf8_fprintf( stdout, " %s\n", module_gettext(m, p_item->psz_longtext ) ); } @@ -1478,8 +1485,7 @@ static void Usage( libvlc_int_t *p_this, char const *psz_search ) utf8_fprintf( stdout, "\n %s\n", module_gettext( p_parser, p_item->psz_text ) ); } - if( b_description && p_item->psz_longtext - && *p_item->psz_longtext ) + if( b_description && p_item->psz_longtext ) { if( b_color ) utf8_fprintf( stdout, CYAN " %s\n" GRAY, @@ -1537,8 +1543,8 @@ static void Usage( libvlc_int_t *p_this, char const *psz_search ) if( p_item->min.i || p_item->max.i ) { - sprintf( psz_buffer, "%s [%i .. %i]", psz_type, - p_item->min.i, p_item->max.i ); + sprintf( psz_buffer, "%s [%"PRId64" .. %"PRId64"]", + psz_type, p_item->min.i, p_item->max.i ); psz_type = psz_buffer; } @@ -1725,8 +1731,7 @@ static void Usage( libvlc_int_t *p_this, char const *psz_search ) } } - if( b_description_hack && p_item->psz_longtext - && *p_item->psz_longtext ) + if( b_description_hack && p_item->psz_longtext ) { sprintf( psz_buffer, "%s%s", module_gettext( p_parser, p_item->psz_longtext ),