codecparsers: h265parser: Use a table map to get profile.
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Wed, 15 Dec 2021 10:58:07 +0000 (11:58 +0100)
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Thu, 16 Dec 2021 16:08:30 +0000 (17:08 +0100)
commit3040a2607308fe8d931a23d2c2a0ef7094c0df12
treec7c8de7af1c098ed68552665d024912e0d4526aa
parent168ad9f58f6dfbdb588fa3e07158be5c3f13a50e
codecparsers: h265parser: Use a table map to get profile.

Instead of a sequence of if statements, declare a table to map profile
idc with profiles and traverse it.

Also, first add the profile from the parsed profile idc and later add,
into the profile array, the profile from the compatibility flags.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1440>
subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gsth265parser.c