diff options
Diffstat (limited to 'src/VLCInput.cpp')
-rw-r--r-- | src/VLCInput.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/VLCInput.cpp b/src/VLCInput.cpp index f527f20..468ef70 100644 --- a/src/VLCInput.cpp +++ b/src/VLCInput.cpp @@ -159,8 +159,8 @@ int VLCInput::prepare() prepareRender_address, (long long int)(intptr_t)this); - - const char* vlc_args[6]; +#define VLC_ARGS_LEN 32 + const char* vlc_args[VLC_ARGS_LEN]; size_t arg_ix = 0; std::stringstream arg_verbose; arg_verbose << "--verbose=" << m_verbosity; @@ -185,6 +185,16 @@ int VLCInput::prepare() vlc_args[arg_ix++] = "--sout"; vlc_args[arg_ix++] = smem_options; // Stream to memory + for (const auto& opt : m_additional_opts) { + if (arg_ix < VLC_ARGS_LEN) { + vlc_args[arg_ix++] = opt.c_str(); + } + else { + fprintf(stderr, "Too many VLC options given"); + return 1; + } + } + if (m_verbosity) { fprintf(stderr, "Initialising VLC with options:\n"); for (size_t i = 0; i < arg_ix; i++) { |