Commit 9d55c0f9 authored by Andrew Voznytsa's avatar Andrew Voznytsa

Don't wait for EOS if recording is not active

parent 0cc10d6b
......@@ -247,6 +247,11 @@ GstVideoReceiver::stop(void)
if ((bus = gst_pipeline_get_bus(GST_PIPELINE(_pipeline))) != nullptr) {
gst_bus_disable_sync_message_emission(bus);
gboolean recordingValveClosed = TRUE;
g_object_get(_recorderValve, "drop", &recordingValveClosed, nullptr);
if (recordingValveClosed == FALSE) {
gst_element_send_event(_pipeline, gst_event_new_eos());
GstMessage* msg;
......@@ -263,6 +268,7 @@ GstVideoReceiver::stop(void)
} else {
qCCritical(VideoReceiverLog) << "gst_bus_timed_pop_filtered() failed";
}
}
gst_object_unref(bus);
bus = nullptr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment