Revert "mpegtspacketizer: memcmp potentially seen_before data"
authorEdward Hervey <bilboed@bilboed.com>
Wed, 16 Nov 2022 08:42:08 +0000 (09:42 +0100)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 16 Nov 2022 12:20:41 +0000 (12:20 +0000)
commita40842545f54643e2cafead12afece952acf2c1b
treec5af592f610018c2e0b9c020180f9932d08583ca
parenta87b7da308921c42728b4d1f06f8e1fb0e37141d
Revert "mpegtspacketizer: memcmp potentially seen_before data"

This reverts commit fcad4cc646a23e4e621ec5e8485958ab78d98090.

This was wrong is so many ways.

* The memcmp was badly used (it should use == 0 to check the data is identical,
  and not != 0)
* There was no boundary checks on the present stream section_data when passing
  it to memcmp.
* The return value should have been TRUE (i.e. we have done all checks, none of
  them failed, therefore the section has been seen before)
* stream->section_data would *always* be NULL if the section had already been
  processed

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

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