mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 10:41:04 +00:00
pad-monitor: allow flushing flow returns when pad is flushing
It should always be acceptable to return GST_FLOW_FLUSHING when the pad is flushing
This commit is contained in:
parent
a1775e75e5
commit
1860712098
1 changed files with 8 additions and 3 deletions
|
@ -856,10 +856,9 @@ gst_validate_pad_monitor_check_aggregated_return (GstValidatePadMonitor *
|
|||
GstValidatePadMonitor *othermonitor;
|
||||
GstFlowReturn aggregated = GST_FLOW_NOT_LINKED;
|
||||
gboolean found_a_pad = FALSE;
|
||||
GstPad *pad = GST_VALIDATE_PAD_MONITOR_GET_PAD (monitor);
|
||||
|
||||
iter =
|
||||
gst_pad_iterate_internal_links (GST_VALIDATE_PAD_MONITOR_GET_PAD
|
||||
(monitor));
|
||||
iter = gst_pad_iterate_internal_links (pad);
|
||||
done = FALSE;
|
||||
while (!done) {
|
||||
GValue value = { 0, };
|
||||
|
@ -902,6 +901,11 @@ gst_validate_pad_monitor_check_aggregated_return (GstValidatePadMonitor *
|
|||
if (aggregated == GST_FLOW_OK || aggregated == GST_FLOW_EOS) {
|
||||
/* those are acceptable situations */
|
||||
|
||||
if (GST_PAD_IS_FLUSHING (pad) && ret == GST_FLOW_FLUSHING) {
|
||||
/* pad is flushing, always acceptable to return flushing */
|
||||
return;
|
||||
}
|
||||
|
||||
if (monitor->is_eos && ret == GST_FLOW_EOS) {
|
||||
/* this element received eos and returned eos */
|
||||
return;
|
||||
|
@ -1125,6 +1129,7 @@ gst_validate_pad_monitor_flush (GstValidatePadMonitor * pad_monitor)
|
|||
pad_monitor->timestamp_range_end = GST_CLOCK_TIME_NONE;
|
||||
pad_monitor->has_segment = FALSE;
|
||||
pad_monitor->is_eos = FALSE;
|
||||
pad_monitor->last_flow_return = GST_FLOW_OK;
|
||||
gst_caps_replace (&pad_monitor->last_caps, NULL);
|
||||
pad_monitor->caps_is_audio = pad_monitor->caps_is_video = FALSE;
|
||||
|
||||
|
|
Loading…
Reference in a new issue