mpegtsbase: Use an array to track programs
authorEdward Hervey <edward@centricular.com>
Tue, 2 Nov 2021 08:18:57 +0000 (09:18 +0100)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 9 Mar 2022 19:45:08 +0000 (19:45 +0000)
commit76543ee73a3a2c36493e3af7d479c4e76d6afab4
treec56673521c8aa5e56a873bb2bdad0d88cee330b7
parent2943d92389e46addafdd81c07ba35f48c8187a48
mpegtsbase: Use an array to track programs

We need to be able to look for programs by their PID also. Using a hash table
was a bit sub-par (and overkill) for storing a range of programs.

This is needed because there could potentially be two programs with the same
program id but different PMT PID (while one is being deactivated the new one
would "exist").

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