mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
aggregator: Take pad lock while releasing buffers when removing pads
Accessing the buffers in all other places requires the pad lock and not taking it here can cause access to already freed buffers if there's concurrent access from another thread. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5510>
This commit is contained in:
parent
f7d4ea6eec
commit
70ee7293e0
1 changed files with 2 additions and 0 deletions
|
@ -2122,7 +2122,9 @@ gst_aggregator_release_pad (GstElement * element, GstPad * pad)
|
|||
|
||||
SRC_LOCK (self);
|
||||
gst_aggregator_pad_set_flushing (aggpad, GST_FLOW_FLUSHING, TRUE);
|
||||
PAD_LOCK (aggpad);
|
||||
gst_buffer_replace (&aggpad->priv->peeked_buffer, NULL);
|
||||
PAD_UNLOCK (aggpad);
|
||||
gst_element_remove_pad (element, pad);
|
||||
|
||||
self->priv->has_peer_latency = FALSE;
|
||||
|
|
Loading…
Reference in a new issue