diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2016-03-04 21:02:15 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2016-03-04 21:02:15 +0100 |
commit | 61b5ba527efef75565336dfa87f0a2432dd5f50b (patch) | |
tree | 611f00a2b1a9b9f1e6a5a4b71eff3f5a027485bd /src/VLCInput.cpp | |
parent | 891bb2592944aa2be2d81e1583e73e632e70537f (diff) | |
download | fdk-aac-61b5ba527efef75565336dfa87f0a2432dd5f50b.tar.gz fdk-aac-61b5ba527efef75565336dfa87f0a2432dd5f50b.tar.bz2 fdk-aac-61b5ba527efef75565336dfa87f0a2432dd5f50b.zip |
Add -L option to give arbitrary options to VLC
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++) { |