playsink: Properly mark pending blocked pads
authorEdward Hervey <edward@centricular.com>
Fri, 15 Jan 2016 08:50:29 +0000 (09:50 +0100)
committerEdward Hervey <bilboed@bilboed.com>
Fri, 15 Jan 2016 09:05:58 +0000 (10:05 +0100)
commit62053852de01fb324a915b27c00f5b8dc0f66fb3
treec30fc4a93c9a13e088f62ccb6e33e50ad7634688
parentbc90841c7d069fcdb0e6d681f1cbf8a326e080f3
playsink: Properly mark pending blocked pads

When blocking input pads, we also need to properly set the appropriate
pending flag.

Without this, when switching stream types after initial configuration
(like going from Audio+Video to Audio+Video+Sub) playsink would never
wait for *all* input streams to be blocked (it would just wait for the
new input pad (text in this case) to be blocked).

Since the reconfiguration might introduce unlinking/relinking of elements,
we need to ensure that *ALL* input streams are blocked.

Failure to do so would result in having some input streams pushing data
to inactive elements (returning GST_FLOW_FLUSHING) or unlinked pads
(returning GST_FLOW_NOT_LINKED).

A later optimization could involve only blocking the input pads that
might be involved in reconfiguration. But better be safe than sorry for
now :)
gst/playback/gstplaysink.c