[vlc-devel] Resubmitting [PATCH] npapi plugin slave-input support Add the ability to specify a sound source through slave-input, for example a v4l video capture device with alsa audio. Now with added buffer overflow protection.

Sergey Radionov rsatom at gmail.com
Tue Mar 20 15:46:13 CET 2012


2012/3/20 Tord Andersson <tord.andersson at endian.se>:
> ---
>  npapi/vlcplugin_base.cpp |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/npapi/vlcplugin_base.cpp b/npapi/vlcplugin_base.cpp
> index 1d9db49..3beee35 100644
> --- a/npapi/vlcplugin_base.cpp
> +++ b/npapi/vlcplugin_base.cpp
> @@ -464,6 +464,12 @@ NPError VlcPluginBase::init(int argc, char* const argn[], char* const argv[])
>         {
>             set_enable_fs( boolValue(argv[i]) );
>         }
> +        else if( !strcmp( argn[i], "input-slave" ) )
> +        {
> +            char psz_input_slave_opts[80] = "--input-slave=";
> +            strncat(psz_input_slave_opts, argv[i], sizeof(psz_input_slave_opts) - strlen(psz_input_slave_opts) - 1);
> +            ppsz_argv[ppsz_argc++] = psz_input_slave_opts;
> +        }
btw, after closing brace psz_input_slave_opts can be not exists
anymore... and ppsz_argv will point to nowere...

>         else if( !strcmp( argn[i], "mute" ) )
>         {
>             if( boolValue(argv[i]) )
> --
> 1.7.5.4
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel



More information about the vlc-devel mailing list