tsmux: Recheck existing pad PIDs when requesting a new pad with a random pid
authorSebastian Dröge <sebastian@centricular.com>
Thu, 10 Jun 2021 08:36:43 +0000 (11:36 +0300)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 23 Jun 2021 05:44:48 +0000 (05:44 +0000)
commit127ade39cf175c7961a0eb75d689f6526920ab15
treec8818f6509e2b0f0214df42c5bb6c2a0acbf51e7
parent569910a5ac14a042aadd8ff5323b41128e413fd0
tsmux: Recheck existing pad PIDs when requesting a new pad with a random pid

Previously pads might have been requested already (e.g. in NULL state),
then reset was called (e.g. because changing state) and then a new pad
was requested. Resetting is re-creating the internal muxer object and as
such resetting the pid counter, so the next requested pad would get the
same pid as the first requested pad which then leads to collisions.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2317>
gst/mpegtsmux/gstbasetsmux.c