Commit graph

14 commits

Author SHA1 Message Date
Sebastian Dröge 2dde87710c typefind: Handle WavPack block sizes > 131072
These are valid nowadays.

Also handle ID_ODD_SIZE and ID_WVX_NEW_BITSTREAM. The parser already
handles the former but not the latter.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6498>
2024-04-04 15:10:02 +00:00
Ilie Halip 6846810f50 typefindfunctions: Increase xml typefinder closing brace limit
If the first XML element in a DASH manifest has its closing brance
beyond the first 512 bytes (because of, e.g. lots of attributes),
the MPD typefinder fails. Try to read a larger block, and then
smaller blocks until 512 bytes.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4241>
2023-03-29 17:50:20 +00:00
Tim-Philipp Müller 8759b77a50 gst-plugins-base: re-indent with GNU indent 2.2.12
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4182>
2023-03-17 03:18:53 +00:00
Sebastian Dröge fa2b98f957 typefindfunctions: Add missing length check to XML typefinder
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=54811

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3690>
2023-01-06 18:10:20 +02:00
Sebastian Dröge 54ff9b2b5f typefindfunctions: Reduce XML typefinder minimum data size from 64 to 32 bytes
64 bytes makes the typefinder fail on very small XML documents on which
it succeeded previously.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3690>
2023-01-06 14:37:31 +02:00
Sebastian Dröge 401ea9f683 typefindfunctions: Check for the SVG namespace URL in addition to <svg and the doctype
Finding the SVG namespace URL gives a clear indication that this is
actually an SVG file while the `<svg>` tag only gives a likely
indication as it's rather short.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3631>
2023-01-04 00:49:47 +00:00
Sebastian Dröge 11520403a5 typefindfunctions: Make XML typefinder more strict
If a XMLDec is found, check also for its end. Similarly, check for the
end of the XML tag we're looking for and make sure that the following
characters are valid.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3632>
2023-01-03 12:07:43 +00:00
Seungha Yang 21dd2076f6 typefindfunctions: Fix WebVTT format detection
If WebVTT file consists of "WebVTT" header without body,
the file size can be smaller than 10 bytes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1359>
2022-02-11 13:48:45 +00:00
Sebastian Dröge 23a06f7a31 typefindfunctions: Use memcmp() instead of a strange macro around strncmp()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1234>
2021-10-25 09:17:43 +00:00
Sebastian Dröge 37a744889c typefindfunctions: Add various CMAF brands to the MP4 typefinder
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1234>
2021-10-25 09:17:42 +00:00
Sebastian Dröge 041bc2652b typefindfunctions: Refactor ftyp brands checking
Store known brands in arrays and add a helper function to check them.

Also add all the `iso3` to `isob` ISO brands and the `hlsf` ISO
fragmented brand.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1234>
2021-10-25 09:17:42 +00:00
Sebastian Dröge 66aef5ef46 typefindfunctions: Add various other boxes to the list of known top-level MP4 boxes
styp, udta, sidx, ssix, prft, mfra, pdin and meta are in the ISOBMFF
spec and emsg in the CMAF spec.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1234>
2021-10-25 09:17:42 +00:00
Stéphane Cerveau 84b357dd5f typefindfunctions: differentiate h265 from h264
in some cases, the algo gives the same probability
to h264 and h265 for h26x stream resulting in a h265
stream detected as a h264.
if sps/pps/vps detected, increase the probabilty.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/957>
2021-10-02 10:03:21 +00:00
Thibault Saunier 2fd28195ca Move files from gst-plugins-base into the "subprojects/gst-plugins-base/" subdir 2021-09-24 16:13:26 -03:00
Renamed from gst/typefind/gsttypefindfunctions.c (Browse further)