Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
255e59a6
Commit
255e59a6
authored
Jan 25, 2020
by
Andrew Voznytsa
Browse files
Fix double EOS handling
parent
ee8193f3
Changes
1
Show whitespace changes
Inline
Side-by-side
src/VideoStreaming/VideoReceiver.cc
View file @
255e59a6
...
@@ -513,9 +513,10 @@ VideoReceiver::stop()
...
@@ -513,9 +513,10 @@ VideoReceiver::stop()
_shutdownPipeline
();
_shutdownPipeline
();
}
else
if
(
_pipeline
!=
nullptr
&&
!
_stopping
)
{
}
else
if
(
_pipeline
!=
nullptr
&&
!
_stopping
)
{
qCDebug
(
VideoReceiverLog
)
<<
"Stopping _pipeline"
;
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
());
gst_element_send_event
(
_pipeline
,
gst_event_new_eos
());
_stopping
=
true
;
_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
));
GstMessage
*
message
=
gst_bus_timed_pop_filtered
(
bus
,
GST_CLOCK_TIME_NONE
,
(
GstMessageType
)(
GST_MESSAGE_EOS
|
GST_MESSAGE_ERROR
));
gst_object_unref
(
bus
);
gst_object_unref
(
bus
);
if
(
GST_MESSAGE_TYPE
(
message
)
==
GST_MESSAGE_ERROR
)
{
if
(
GST_MESSAGE_TYPE
(
message
)
==
GST_MESSAGE_ERROR
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment