media: use purple purple_media_set_require_encryption api
commit129175e9f66ec1f458362f5086862cf52058b9d0
authorFabrice Bellet <fabrice@bellet.info>
Sun, 14 Jul 2019 20:55:52 +0000 (14 22:55 +0200)
committerJakub Adam <jakub.adam@ktknet.cz>
Mon, 30 Sep 2019 09:30:40 +0000 (30 11:30 +0200)
treefcf5968eab6ac946cc033f2aba2c6fd2df2a6563
parent4af0ce50c33d1bf2f4996593ee59a9f71b612d84
media: use purple purple_media_set_require_encryption api

This patch uses the require-encryption property of the farstream
conference element, to block by default the stream at the srtpdec
element at creation time, until we know from sdp whether it will be
encrypted or not. The installation of the keys in the element unblocks
the stream, by processing it through the decoder, else the toggle of the
property to "false" also unblocks the stream in "pass through" mode.

This patch prevents a crypted stream to pass through the srtpdec element
in the short time frame before the crypto elements have been installed,
and to reach the rest of the pipeline, causing codec decoder errors
where decrypted stream is expected.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1016
src/api/sipe-backend.h
src/core/sipe-media.c
src/miranda/miranda-media.c
src/purple/purple-media.c
src/telepathy/telepathy-stubs.c