mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
decodebin: Properly deactivate ghostpads
Just setting the ghostpad as flushing wasn't enough. It needs to be consistent on the internal proxypad also, otherwise you end up in situations where: * a pending buffer on the target pad triggers the sticky event propagation * the default implementation sees that the proxypad is not flushing, so it tries to push it to the other pad (the actual ghostpad) * the ghostpad is flushing, so returns FALSE * the push_event function sees that pushing the event failed... * ... and pending buffer push returns GST_FLOW_ERROR, instead of GST_FLOW_FLUSHING By using gst_pad_set_active(FALSE), we ensure that both the ghostpad and the proxypad are flushing/deactivated. The situation above will no longer occur, and a GST_FLOW_FLUSHING will be returned.
This commit is contained in:
parent
d2e210bbea
commit
d0eface01c
1 changed files with 1 additions and 1 deletions
|
@ -5111,7 +5111,7 @@ unblock_pads (GstDecodeBin * dbin)
|
|||
}
|
||||
dpad->blocked = FALSE;
|
||||
/* make flushing, prevent NOT_LINKED */
|
||||
GST_PAD_SET_FLUSHING (GST_PAD_CAST (dpad));
|
||||
gst_pad_set_active (GST_PAD_CAST (dpad), FALSE);
|
||||
gst_object_unref (dpad);
|
||||
gst_object_unref (opad);
|
||||
GST_DEBUG_OBJECT (dpad, "unblocked");
|
||||
|
|
Loading…
Reference in a new issue