aggregator: Check after waiting if we're still running and otherwise stop
Previously we might've produced a buffer needlessly. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8897>
This commit is contained in:
parent
036801222f
commit
b05a498187
@ -924,6 +924,13 @@ gst_aggregator_wait_and_check (GstAggregator * self, gboolean * timeout)
|
||||
*/
|
||||
GST_OBJECT_UNLOCK (self);
|
||||
SRC_WAIT (self);
|
||||
|
||||
/* After waiting, check if we're actually still running */
|
||||
if (!self->priv->running || !self->priv->send_eos) {
|
||||
SRC_UNLOCK (self);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
} else {
|
||||
GstClockTime base_time, time;
|
||||
GstClock *clock;
|
||||
@ -965,6 +972,13 @@ gst_aggregator_wait_and_check (GstAggregator * self, gboolean * timeout)
|
||||
"clock returned %d (jitter: %" GST_STIME_FORMAT ")",
|
||||
status, GST_STIME_ARGS (jitter));
|
||||
|
||||
/* After waiting, check if we're actually still running */
|
||||
if (!self->priv->running || !self->priv->send_eos) {
|
||||
SRC_UNLOCK (self);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* we timed out */
|
||||
if (status == GST_CLOCK_OK || status == GST_CLOCK_EARLY) {
|
||||
GList *l;
|
||||
|
Loading…
x
Reference in New Issue
Block a user