urisourcebin: Fix crash during EOS handling
Submitted by Seungha Yang
Link to original bug (#777212)
Description
Slot has two cases to receive fake EOS.
a) actual EOS from demuxer's pad
b) demuxer's pad-removed.
When a) happened, slot is still marked as linked.
And when b) happend, slot will be marked as unlinked.
Sometimes, following sequence is possible, and it causes crash
- demuxer pushed EOS (fake-eos-A)
- Then, the demuxer's pad was removed (fake-eos-A)
- slot's srcpad got "fake-eos-A" but it was already marked as unlinked by
pad-removed. So, urisourcebin will throw the slot to threadpool to remove it. - "fake-eos-B" reached to slot's src pad and trying to free the slot again.