diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-02-05 16:17:36 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-02-05 16:17:36 +0100 |
commit | 25e075244025a930b9f6dda16138eca9d9877643 (patch) | |
tree | b1041ee636128cfbc1d48ecf62fe48acb5a1274b | |
parent | ab0c695db6f18c1798c6890fef269dd971e0672a (diff) | |
download | ODR-AudioEnc-25e075244025a930b9f6dda16138eca9d9877643.tar.gz ODR-AudioEnc-25e075244025a930b9f6dda16138eca9d9877643.tar.bz2 ODR-AudioEnc-25e075244025a930b9f6dda16138eca9d9877643.zip |
Catch and handle VLC initialisation failure
-rw-r--r-- | src/VLCInput.cpp | 4 |
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 |