mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
gstharness: don't push the event to the queue before processing
The application might pull and unref it by the time the code gets around to check it for EOS.
This commit is contained in:
parent
1375c53f04
commit
a9162fc2ed
1 changed files with 1 additions and 1 deletions
|
@ -277,13 +277,13 @@ gst_harness_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||||
gst_object_unref (fwdpad);
|
gst_object_unref (fwdpad);
|
||||||
HARNESS_LOCK (h);
|
HARNESS_LOCK (h);
|
||||||
} else {
|
} else {
|
||||||
g_async_queue_push (priv->sink_event_queue, event);
|
|
||||||
if (GST_EVENT_TYPE (event) == GST_EVENT_EOS) {
|
if (GST_EVENT_TYPE (event) == GST_EVENT_EOS) {
|
||||||
g_mutex_lock (&priv->buf_or_eos_mutex);
|
g_mutex_lock (&priv->buf_or_eos_mutex);
|
||||||
priv->eos_received = TRUE;
|
priv->eos_received = TRUE;
|
||||||
g_cond_signal (&priv->buf_or_eos_cond);
|
g_cond_signal (&priv->buf_or_eos_cond);
|
||||||
g_mutex_unlock (&priv->buf_or_eos_mutex);
|
g_mutex_unlock (&priv->buf_or_eos_mutex);
|
||||||
}
|
}
|
||||||
|
g_async_queue_push (priv->sink_event_queue, event);
|
||||||
}
|
}
|
||||||
HARNESS_UNLOCK (h);
|
HARNESS_UNLOCK (h);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue