pad: Fix pad state when deactivating from one mode and then trying to activate anothe...
authorSebastian Dröge <sebastian@centricular.com>
Tue, 10 May 2016 12:01:42 +0000 (15:01 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Tue, 10 May 2016 12:07:51 +0000 (15:07 +0300)
commit14f71d2e2766a1750f60c16c344f78f55c9ba95a
tree8927dfd5d76de5062cc3b8797c5a281a7279c1c0
parentc9da8b0e7f53005ab125e48165dae39fbfee2352
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.
gst/gstpad.c