diff options
Diffstat (limited to 'src/VLCInput.cpp')
-rw-r--r-- | src/VLCInput.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/VLCInput.cpp b/src/VLCInput.cpp index 80e85be..d2ae4f0 100644 --- a/src/VLCInput.cpp +++ b/src/VLCInput.cpp @@ -291,13 +291,18 @@ void VLCInput::preRender_cb(uint8_t** pp_pcm_buffer, size_t size) void VLCInput::exit_cb() { - std::lock_guard<std::mutex> lock(m_queue_mutex); + if (m_running) { + std::lock_guard<std::mutex> lock(m_queue_mutex); - fprintf(stderr, "VLC exit, restarting...\n"); + fprintf(stderr, "VLC exit, restarting...\n"); - cleanup(); - m_current_buf.clear(); - prepare(); + cleanup(); + m_current_buf.clear(); + prepare(); + } + else { + fprintf(stderr, "VLC exit.\n"); + } } void VLCInput::cleanup() |