mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
videoaggregator: don't let a repeat-after-eos pad prevent EOS
.. if there are pads present that are not repeating after EOS. Fixes #664
This commit is contained in:
parent
dec2750e96
commit
65f2bb8fa2
1 changed files with 7 additions and 1 deletions
|
@ -1389,6 +1389,8 @@ gst_video_aggregator_fill_queues (GstVideoAggregator * vagg,
|
|||
{
|
||||
GList *l;
|
||||
gboolean eos = TRUE;
|
||||
gboolean repeat_pad_eos = FALSE;
|
||||
gboolean has_no_repeat_pads = FALSE;
|
||||
gboolean need_more_data = FALSE;
|
||||
gboolean need_reconfigure = FALSE;
|
||||
|
||||
|
@ -1411,6 +1413,8 @@ gst_video_aggregator_fill_queues (GstVideoAggregator * vagg,
|
|||
|
||||
if (!is_eos)
|
||||
eos = FALSE;
|
||||
if (!pad->priv->repeat_after_eos)
|
||||
has_no_repeat_pads = TRUE;
|
||||
buf = gst_aggregator_pad_peek_buffer (bpad);
|
||||
if (buf) {
|
||||
GstClockTime start_time, end_time;
|
||||
|
@ -1554,7 +1558,7 @@ gst_video_aggregator_fill_queues (GstVideoAggregator * vagg,
|
|||
}
|
||||
} else {
|
||||
if (is_eos && pad->priv->repeat_after_eos) {
|
||||
eos = FALSE;
|
||||
repeat_pad_eos = TRUE;
|
||||
GST_DEBUG_OBJECT (pad, "ignoring EOS and re-using previous buffer");
|
||||
continue;
|
||||
}
|
||||
|
@ -1583,6 +1587,8 @@ gst_video_aggregator_fill_queues (GstVideoAggregator * vagg,
|
|||
|
||||
if (need_more_data)
|
||||
return GST_AGGREGATOR_FLOW_NEED_DATA;
|
||||
if (eos && !has_no_repeat_pads && repeat_pad_eos)
|
||||
eos = FALSE;
|
||||
if (eos)
|
||||
return GST_FLOW_EOS;
|
||||
|
||||
|
|
Loading…
Reference in a new issue