mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-21 15:56:42 +00:00
videomixer: Do not send flush_stop ourself after a flush_start
When we receive a flush_start, we should wait for the next flush_stop and foward it, not create a flush_stop ourself.
This commit is contained in:
parent
db90f6e68d
commit
e47ffb203b
2 changed files with 8 additions and 3 deletions
|
@ -644,6 +644,7 @@ gst_videomixer2_reset (GstVideoMixer2 * mix)
|
|||
|
||||
mix->newseg_pending = TRUE;
|
||||
g_atomic_int_set (&mix->flush_stop_pending, FALSE);
|
||||
g_atomic_int_set (&mix->waiting_flush_stop, FALSE);
|
||||
}
|
||||
|
||||
/* 1 == OK
|
||||
|
@ -1734,13 +1735,13 @@ gst_videomixer2_sink_event (GstCollectPads * pads, GstCollectData * cdata,
|
|||
break;
|
||||
}
|
||||
case GST_EVENT_FLUSH_START:
|
||||
g_atomic_int_set (&mix->flush_stop_pending, TRUE);
|
||||
g_atomic_int_set (&mix->waiting_flush_stop, TRUE);
|
||||
ret = gst_collect_pads_event_default (pads, cdata, event, discard);
|
||||
event = NULL;
|
||||
break;
|
||||
case GST_EVENT_FLUSH_STOP:
|
||||
mix->newseg_pending = TRUE;
|
||||
if (g_atomic_int_compare_and_exchange (&mix->flush_stop_pending, TRUE,
|
||||
if (g_atomic_int_compare_and_exchange (&mix->waiting_flush_stop, TRUE,
|
||||
FALSE)) {
|
||||
GST_DEBUG_OBJECT (pad, "forwarding flush stop");
|
||||
ret = gst_collect_pads_event_default (pads, cdata, event, discard);
|
||||
|
|
|
@ -97,7 +97,11 @@ struct _GstVideoMixer2
|
|||
gboolean send_caps;
|
||||
|
||||
gboolean newseg_pending;
|
||||
gboolean flush_stop_pending;
|
||||
gboolean flush_stop_pending; /* Used when we receive a flushing seek,
|
||||
to send a flush_stop right before the
|
||||
following buffer */
|
||||
gboolean waiting_flush_stop; /* Used when we receive a flush_start to make
|
||||
sure to forward the flush_stop only once */
|
||||
|
||||
GstVideoMixer2Background background;
|
||||
|
||||
|
|
Loading…
Reference in a new issue