mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
message: revive async delivery message before bus thread can run unref
Revive message in dispose handler before we signal the bus thread, otherwise the bus thread might be woken up and unref the message before we had a chance to revive it yet.
This commit is contained in:
parent
4a757e651a
commit
10f038d4fb
1 changed files with 3 additions and 1 deletions
|
@ -172,6 +172,9 @@ _gst_message_dispose (GstMessage * message)
|
|||
gboolean do_free = TRUE;
|
||||
|
||||
if (GST_MINI_OBJECT_FLAG_IS_SET (message, GST_MESSAGE_FLAG_ASYNC_DELIVERY)) {
|
||||
/* revive message, so bus can finish with it and clean it up */
|
||||
gst_message_ref (message);
|
||||
|
||||
GST_INFO ("[msg %p] signalling async free", message);
|
||||
|
||||
GST_MESSAGE_LOCK (message);
|
||||
|
@ -179,7 +182,6 @@ _gst_message_dispose (GstMessage * message)
|
|||
GST_MESSAGE_UNLOCK (message);
|
||||
|
||||
/* don't free it yet, let bus finish with it first */
|
||||
gst_message_ref (message);
|
||||
do_free = FALSE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue