gstpad: relinking outside streaming thread sometimes results in events getting lost
Submitted by Matej
Created attachment 299530
The problem that's quite racy and difficult to reproduce. Basically we are relinking element outside streaming thread, which occasionally results in some sticky events getting lost.
The problem is in push_sticky. While the gst_pad_push_event_unchecked call is in progress, the pad peer changes. But regardless of that, ev->received is set to TRUE.
Patch corrects this by checking if the peerpad really has received the event. If not, it will be resend in next check_sticky.
Patch 299530, "Patch":