rtsp-stream: avoid pushing data on unlinked udpsrc pad during setup
authorGöran Jönsson <goranjn@axis.com>
Wed, 27 Jun 2018 06:30:42 +0000 (08:30 +0200)
committerTim-Philipp Müller <tim@centricular.com>
Wed, 27 Jun 2018 10:25:45 +0000 (12:25 +0200)
commitc1fab570d8e845685b7e890b2a588314382c1ded
tree1fa140d43d4c6e72da6ffba9ac60c406fbf0653a
parentf110016ac6bb90a2cbadfd8275a0a997babf57e2
rtsp-stream: avoid pushing data on unlinked udpsrc pad during setup

Fix race when setting up source elements.

Since we set the source element(s) to PLAYING state before hooking
them up to the downstream funnel, it's possible for the source element
to receive packets before we actually get to linking it to the funnel,
in which case buffers would be pushed out on an unlinked pad, causing
it to error out and stop receiving more data.

We fix this by blocking the source's srcpad until we have linked it.

https://bugzilla.gnome.org/show_bug.cgi?id=796160
gst/rtsp-server/rtsp-stream.c