rtsp-stream: fix get_rates raciness
authorMathieu Duponchelle <mathieu@centricular.com>
Thu, 16 Dec 2021 20:04:53 +0000 (21:04 +0100)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Thu, 16 Dec 2021 22:18:12 +0000 (22:18 +0000)
commit79f11eb77804d7f70f2bc8e062c2201cd1f191b6
treec3aa7e3c79c7aa85298680d8ca724ae01d1535ff
parent69c4e317d85d2dc717edc98d6e6fe1a0b2c150e9
rtsp-stream: fix get_rates raciness

Prior to this patch, we considered that a stream was blocking
whenever a pad probe was triggered for either the RTP pad or
the RTCP pad.

This led to situations where we subsequently unblocked and expected
to find a segment on the RTP pad, which was racy.

Instead, we now only consider that the stream is blocking when
the pad probe for the RTP pad has triggered with a blockable object
(buffer, buffer list, gap event).

The RTCP pad is simply blocked without affecting the state of the
stream otherwise.

Fixes #929

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1452>
subprojects/gst-rtsp-server/gst/rtsp-server/rtsp-stream.c