v4l2codecs: Fix debug assertion in register functions
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Thu, 27 Jan 2022 16:49:53 +0000 (11:49 -0500)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Thu, 27 Jan 2022 18:53:41 +0000 (18:53 +0000)
commitd7363bd838572a9c638672723a2d621dffc4e4dc
treed161d599b874ed3f9ef1bb98484ab20677db59aa
parentbea8cba5e69a34b35986a95a6d225a0b7571124e
v4l2codecs: Fix debug assertion in register functions

As now, we warn if the decoder have no support src pixel format, but that
warning is called before the type (hence the debug category) is initialized.
Fix this by moving the debug category init out of the type initialization,
into the register funcitons.

This will fix an assertion that occures in the register function and allow
relevant log to be seen by the users.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1588>
subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2codech264dec.c
subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2codecmpeg2dec.c
subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2codecvp8dec.c
subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2codecvp9dec.c