Unverified Commit 7e349568 authored by Gus Grubba's avatar Gus Grubba Committed by GitHub

Merge pull request #8259 from andrewvoznytsa/pr-rtsp-fix

Fix double EOS handling
parents 2702289a 255e59a6
......@@ -513,9 +513,10 @@ VideoReceiver::stop()
_shutdownPipeline();
} else if (_pipeline != nullptr && !_stopping) {
qCDebug(VideoReceiverLog) << "Stopping _pipeline";
GstBus* bus = gst_pipeline_get_bus(GST_PIPELINE(_pipeline));
gst_bus_disable_sync_message_emission(bus);
gst_element_send_event(_pipeline, gst_event_new_eos());
_stopping = true;
GstBus* bus = gst_pipeline_get_bus(GST_PIPELINE(_pipeline));
GstMessage* message = gst_bus_timed_pop_filtered(bus, GST_CLOCK_TIME_NONE, (GstMessageType)(GST_MESSAGE_EOS|GST_MESSAGE_ERROR));
gst_object_unref(bus);
if(GST_MESSAGE_TYPE(message) == GST_MESSAGE_ERROR) {
......
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