mxfdemux: Store GstMXFDemuxEssenceTrack in their own fixed allocation
authorSebastian Dröge <sebastian@centricular.com>
Thu, 19 Oct 2023 21:09:57 +0000 (00:09 +0300)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Fri, 10 Nov 2023 16:20:43 +0000 (16:20 +0000)
commit7dfaa57b6f9b55f17ffe824bd8988bb71ae11353
tree780c526fef1a0e8b6014c4544c06c6d4cab34ef3
parentb76a801f57353b893c344025cac56413140fca6d
mxfdemux: Store GstMXFDemuxEssenceTrack in their own fixed allocation

Previously they were stored inline inside a GArray, but as references to
the tracks were stored in various other places although the array could
still be updated (and reallocated!), this could lead to dangling
references in various places.

Instead now store them in a GPtrArray in their own allocation so each
track's memory position stays fixed.

Fixes ZDI-CAN-22299

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3055

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5638>
subprojects/gst-plugins-bad/gst/mxf/mxfdemux.c
subprojects/gst-plugins-bad/gst/mxf/mxfdemux.h