mpegts: Handle "empty" PMT gracefully
authorEdward Hervey <edward@centricular.com>
Wed, 27 Apr 2022 13:24:50 +0000 (15:24 +0200)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Thu, 28 Apr 2022 09:36:54 +0000 (09:36 +0000)
commit10f72da5040b74678c8f81723971127ee8bee04f
tree36e501e7b7f36fcb1dd6e5ca4388d6f18e204e92
parent853963ba214088de306c7deae81d30f42466ef1c
mpegts: Handle "empty" PMT gracefully

Some streams have 2 PMT sections in a single TS packet. The first one is "valid"
but doesn't contain/define any streams. That causes an unrecoverable issue when
we try to activate the 2nd (valid) PMT.

Instead of doing that, pre-emptively refuse to process PMT without any streams
present within. We still do post that section on the bus to inform applications.

Fixes #1181

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2310>
subprojects/gst-plugins-bad/gst/mpegtsdemux/mpegtsbase.c