mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
gstpad: Fix flush-stop event handling
A flush-stop event would make a pad unflushing, causing it to start acting as an activated pad. This, for example, could lead to the chain function being called when stuff isn't initialized. This could happend when setting qtdemux to NULL while a seek was being handled in the upstream filesrc (in push mode). This patch makes it check if it is activated before setting it to unflushing.
This commit is contained in:
parent
8ef7e46d24
commit
60fba4df8b
1 changed files with 4 additions and 2 deletions
|
@ -5074,8 +5074,10 @@ gst_pad_send_event (GstPad * pad, GstEvent * event)
|
|||
GST_CAT_DEBUG_OBJECT (GST_CAT_EVENT, pad, "set flush flag");
|
||||
break;
|
||||
case GST_EVENT_FLUSH_STOP:
|
||||
GST_PAD_UNSET_FLUSHING (pad);
|
||||
GST_CAT_DEBUG_OBJECT (GST_CAT_EVENT, pad, "cleared flush flag");
|
||||
if (G_LIKELY (GST_PAD_ACTIVATE_MODE (pad) != GST_ACTIVATE_NONE)) {
|
||||
GST_PAD_UNSET_FLUSHING (pad);
|
||||
GST_CAT_DEBUG_OBJECT (GST_CAT_EVENT, pad, "cleared flush flag");
|
||||
}
|
||||
GST_OBJECT_UNLOCK (pad);
|
||||
/* grab stream lock */
|
||||
GST_PAD_STREAM_LOCK (pad);
|
||||
|
|
Loading…
Reference in a new issue