Fix the codec registration logic such that all supported profiles are available instead of just the first in the list. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5282>