mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 00:31:13 +00:00
aggregator: Reset EOS flag after receiving a stream-start event
And also don't assert that there are no buffers queued up when handling an EOS event. The pad's streaming thread might've already received a new stream-start event and queued up a buffer in the meantime. This still leaves a race condition where the srcpad task sees all pads in EOS state and finishes the stream, while shortly afterwards a pad might receive a stream-start event again, but this doesn't seem to be solveable with the current aggregator design. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2772>
This commit is contained in:
parent
0e143a00dd
commit
4a8e37d22e
1 changed files with 3 additions and 1 deletions
|
@ -1705,7 +1705,6 @@ gst_aggregator_default_sink_event (GstAggregator * self,
|
||||||
{
|
{
|
||||||
SRC_LOCK (self);
|
SRC_LOCK (self);
|
||||||
PAD_LOCK (aggpad);
|
PAD_LOCK (aggpad);
|
||||||
g_assert (aggpad->priv->num_buffers == 0);
|
|
||||||
aggpad->priv->eos = TRUE;
|
aggpad->priv->eos = TRUE;
|
||||||
PAD_UNLOCK (aggpad);
|
PAD_UNLOCK (aggpad);
|
||||||
SRC_BROADCAST (self);
|
SRC_BROADCAST (self);
|
||||||
|
@ -1732,6 +1731,9 @@ gst_aggregator_default_sink_event (GstAggregator * self,
|
||||||
}
|
}
|
||||||
case GST_EVENT_STREAM_START:
|
case GST_EVENT_STREAM_START:
|
||||||
{
|
{
|
||||||
|
PAD_LOCK (aggpad);
|
||||||
|
aggpad->priv->eos = FALSE;
|
||||||
|
PAD_UNLOCK (aggpad);
|
||||||
goto eat;
|
goto eat;
|
||||||
}
|
}
|
||||||
case GST_EVENT_GAP:
|
case GST_EVENT_GAP:
|
||||||
|
|
Loading…
Reference in a new issue