diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2020-03-31 10:03:58 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2020-03-31 10:03:58 +0200 |
commit | a1eb6cf861d3c1cbd4e6c016be3cbd2a1e3d797d (patch) | |
tree | 2b4790eec8f47fb086e645717f07c53b30ace919 /src/VLCInput.cpp | |
parent | 2f84a54ec1d10b10293c7b1f4ab9fee31f3c6327 (diff) | |
parent | c6a73c219dbfdfe639372d9922f4eb512f06fa2f (diff) | |
download | ODR-AudioEnc-a1eb6cf861d3c1cbd4e6c016be3cbd2a1e3d797d.tar.gz ODR-AudioEnc-a1eb6cf861d3c1cbd4e6c016be3cbd2a1e3d797d.tar.bz2 ODR-AudioEnc-a1eb6cf861d3c1cbd4e6c016be3cbd2a1e3d797d.zip |
Merge GStreamer into next
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() |