summaryrefslogtreecommitdiffstats
path: root/src/VLCInput.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2016-03-04 21:02:28 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2016-03-04 21:02:28 +0100
commit9379701fa0b8aabceef3e67e351a9327e8dbe658 (patch)
treee42ef452a4a50882598a4fa4539972e0ff2e9955 /src/VLCInput.cpp
parent4da379804526d4ceabd2f9cc8da614744438eabd (diff)
parent61b5ba527efef75565336dfa87f0a2432dd5f50b (diff)
downloadODR-AudioEnc-9379701fa0b8aabceef3e67e351a9327e8dbe658.tar.gz
ODR-AudioEnc-9379701fa0b8aabceef3e67e351a9327e8dbe658.tar.bz2
ODR-AudioEnc-9379701fa0b8aabceef3e67e351a9327e8dbe658.zip
Merge branch 'next' into libtoolame
Diffstat (limited to 'src/VLCInput.cpp')
-rw-r--r--src/VLCInput.cpp14
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++) {