libvisual: use gst_element_class_set_metadata when passing dynamic strings
authorJordan Petridis <jpetridis@gnome.org>
Thu, 11 Jun 2020 17:57:58 +0000 (20:57 +0300)
committerJordan Petridis <jpetridis@gnome.org>
Thu, 11 Jun 2020 17:57:58 +0000 (20:57 +0300)
commit1b567af05190aed9ffdad664434aa287375fce54
tree0484d9c41eac15b35b0641698b4fd75f8d6c72c8
parent30509252ca8dfa6e3146996c083076abf4aef9c7
libvisual: use gst_element_class_set_metadata when passing dynamic strings

gst_element_class_set_metadata is meant to only be used with
static or inlined strings, which isn't the case for this element
resulting in use-after-free later on.

https://gstreamer.freedesktop.org/documentation/gstreamer/gstelement.html?gi-language=c#gst_element_class_set_static_metadata

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/698>
ext/libvisual/visual.c