mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 06:16:36 +00:00
aggregator: Protect exported pad members with the pad's object lock
https://bugzilla.gnome.org/show_bug.cgi?id=742684
This commit is contained in:
parent
cc3f418516
commit
68ac6438f0
2 changed files with 9 additions and 1 deletions
|
@ -191,8 +191,10 @@ gst_aggregator_pad_flush (GstAggregatorPad * aggpad, GstAggregator * agg)
|
||||||
{
|
{
|
||||||
GstAggregatorPadClass *klass = GST_AGGREGATOR_PAD_GET_CLASS (aggpad);
|
GstAggregatorPadClass *klass = GST_AGGREGATOR_PAD_GET_CLASS (aggpad);
|
||||||
|
|
||||||
|
PAD_LOCK (aggpad);
|
||||||
aggpad->eos = FALSE;
|
aggpad->eos = FALSE;
|
||||||
aggpad->priv->flushing = FALSE;
|
aggpad->priv->flushing = FALSE;
|
||||||
|
PAD_UNLOCK (aggpad);
|
||||||
|
|
||||||
if (klass->flush)
|
if (klass->flush)
|
||||||
return klass->flush (aggpad, agg);
|
return klass->flush (aggpad, agg);
|
||||||
|
@ -359,8 +361,13 @@ gst_aggregator_check_pads_ready (GstAggregator * self)
|
||||||
for (l = sinkpads; l != NULL; l = l->next) {
|
for (l = sinkpads; l != NULL; l = l->next) {
|
||||||
pad = l->data;
|
pad = l->data;
|
||||||
|
|
||||||
if (pad->buffer == NULL && !pad->eos)
|
PAD_LOCK (pad);
|
||||||
|
if (pad->buffer == NULL && !pad->eos) {
|
||||||
|
GST_OBJECT_UNLOCK (pad);
|
||||||
goto pad_not_ready;
|
goto pad_not_ready;
|
||||||
|
}
|
||||||
|
PAD_UNLOCK (pad);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_OBJECT_UNLOCK (self);
|
GST_OBJECT_UNLOCK (self);
|
||||||
|
|
|
@ -69,6 +69,7 @@ struct _GstAggregatorPad
|
||||||
{
|
{
|
||||||
GstPad parent;
|
GstPad parent;
|
||||||
|
|
||||||
|
/* Protected by the pad's object lock */
|
||||||
GstBuffer * buffer;
|
GstBuffer * buffer;
|
||||||
GstSegment segment;
|
GstSegment segment;
|
||||||
gboolean eos;
|
gboolean eos;
|
||||||
|
|
Loading…
Reference in a new issue