mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
pad: Fix pad state when deactivating from one mode and then trying to activate another and failing
When activating a pad in PULL mode, it might already be in PUSH mode. We now first try to deactivate it from PUSH mode and then try to activate it in PULL mode. If the activation fails, we would set the pad to flushing and set it back to its old mode. However the old mode is wrong, the pad is not in PUSH mode anymore but in NONE mode. This fixes e.g. typefind in decodebin reactivating PUSH/PULL mode if upstream actually fails to go into PULL mode after first PUSHING data to typefind.
This commit is contained in:
parent
89fac4e81b
commit
7eb494257c
1 changed files with 1 additions and 0 deletions
|
@ -1135,6 +1135,7 @@ activate_mode_internal (GstPad * pad, GstObject * parent, GstPadMode mode,
|
||||||
|
|
||||||
if (G_UNLIKELY (!activate_mode_internal (pad, parent, old, FALSE)))
|
if (G_UNLIKELY (!activate_mode_internal (pad, parent, old, FALSE)))
|
||||||
goto deactivate_failed;
|
goto deactivate_failed;
|
||||||
|
old = GST_PAD_MODE_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
|
|
Loading…
Reference in a new issue