playbin3: Add lock to protect buffering messages
authorJan Schmidt <jan@centricular.com>
Tue, 1 Mar 2022 16:43:00 +0000 (03:43 +1100)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 8 Mar 2022 16:56:16 +0000 (16:56 +0000)
commit17f11c2cda28283a9c183cd469e43b6b8cd8263f
treeb2bfb91320dd7f8b981a9d7035ab755c053099f1
parent1f3ca43c5151a4f6bbd3dc230dda9ea6bca0acd3
playbin3: Add lock to protect buffering messages

Fix a small race where a group can receive stream-start
and post a pending buffering message just as another
thread posts a different buffering message, causing them
to be received by the application out of order. In the
worst case, this leads the application receiving a
stale 99% buffering message and going back to buffering
right after the 100% buffering message.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1840>
subprojects/gst-plugins-base/gst/playback/gstplaybin3.c