rtmp2/connection: Separate inner from outer cancelling
authorJan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com>
Fri, 26 Mar 2021 11:20:07 +0000 (12:20 +0100)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Sun, 28 Mar 2021 11:07:33 +0000 (11:07 +0000)
commit0b916e7cec578f56f96e8c18476003093621db44
treee64a0d5298d3ec17bc006decf830baec2f5e3554
parentf369ca1b321116a14da42f4ced2f5d9e51b79499
rtmp2/connection: Separate inner from outer cancelling

The connection cancels itself when it is closed. To avoid the
cancellable passed to `gst_rtmp_connection_new` from being unexpectedly
cancelled, separate inner from outer cancellation by holding two
cancellables.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1558

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2111>
gst/rtmp2/rtmp/rtmpconnection.c