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: <gstreamer/gst-plugins-bad!2357>
29 jobs for !2357 with backport-mr-2317-into-1.18-tsmux-pid-collision-after-reset in 25 minutes and 39 seconds (queued for 6 seconds)
detached
Status Name Job ID Coverage
  Build Docker
passed alpine amd64 manifest builder docker #11251273

00:00:44

passed android docker #11251272

00:00:27

passed cerbero fedora amd64 docker #11251271

00:00:47

passed fedora amd64 docker #11251270

00:00:41

passed gst-indent amd64 docker #11251274

00:00:32

 
  Preparation
passed gst indent #11251276

00:00:13

passed manifest #11251275

00:00:34

 
  Build
passed build cerbero cross-android universal #11251285
gstreamer

00:08:06

passed build cerbero cross-ios universal #11251289
gst-ios-14.3

00:19:49

passed build cerbero cross win32 #11251286
gstreamer

00:05:38

passed build cerbero cross win64 #11251287
gstreamer

00:05:46

passed build cerbero fedora x86_64 #11251284
gstreamer

00:04:11

passed build cerbero macos x86_64 #11251288
gst-macos-11.1

00:12:05

passed build clang fedora x86_64 #11251280

00:03:47

manual build msys2 #11251283
docker windows 1809 allowed to fail manual
passed build nodebug fedora x86_64 #11251277

00:10:21

passed build static fedora x86_64 #11251278

00:03:57

passed build static nodebug fedora x86_64 #11251279

00:09:06

passed build vs2017 amd64 #11251281
docker windows 1809

00:09:12

passed build vs2017 x86 #11251282
docker windows 1809

00:08:59

 
  Test
passed check fedora #11251290
gstreamer

00:06:06

passed integration testsuites fedora 1/4 #11251291
gstreamer

00:07:40

passed integration testsuites fedora 2/4 #11251292
gstreamer

00:06:02

passed integration testsuites fedora 3/4 #11251293
gstreamer

00:08:18

passed integration testsuites fedora 4/4 #11251294
gstreamer

00:07:10

passed valgrind bad #11251295
gstreamer

00:06:00

 
  Integrate
passed cross-android universal examples #11251296

00:09:09

passed cross-ios universal examples #11251298
gst-ios-14.3

00:04:23

passed documentation #11251297

00:14:58