aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2018-02-05 16:17:36 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2018-02-05 16:17:36 +0100
commit25e075244025a930b9f6dda16138eca9d9877643 (patch)
treeb1041ee636128cfbc1d48ecf62fe48acb5a1274b /src
parentab0c695db6f18c1798c6890fef269dd971e0672a (diff)
downloadODR-AudioEnc-25e075244025a930b9f6dda16138eca9d9877643.tar.gz
ODR-AudioEnc-25e075244025a930b9f6dda16138eca9d9877643.tar.bz2
ODR-AudioEnc-25e075244025a930b9f6dda16138eca9d9877643.zip
Catch and handle VLC initialisation failure
Diffstat (limited to 'src')
-rw-r--r--src/VLCInput.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/VLCInput.cpp b/src/VLCInput.cpp
index 36c77fa..5912509 100644
--- a/src/VLCInput.cpp
+++ b/src/VLCInput.cpp
@@ -227,6 +227,10 @@ void VLCInput::prepare()
// Launch VLC
m_vlc = libvlc_new(arg_ix, vlc_args);
+ if (m_vlc == nullptr) {
+ throw runtime_error("VLC initialisation failed");
+ }
+
libvlc_set_exit_handler(m_vlc, handleVLCExit, this);
// Load the media