summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Petridis <jpetridis@gnome.org>2020-06-11 20:39:33 +0300
committerTim-Philipp Müller <tim@centricular.com>2020-10-14 15:25:46 +0100
commit8fc8117edd759ed12524548c604246cd3bf06d16 (patch)
treea1a754ea811ff7d6e11aa50f1a0954900035581b
parentb5579eb7a835fde1287a2e7dc3e20143da938c0c (diff)
downloadgstreamer-plugins-good-8fc8117edd759ed12524548c604246cd3bf06d16.tar.gz
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 the 2 elements here 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-good/-/merge_requests/622>
-rw-r--r--gst/isomp4/gstqtmux.c2
-rw-r--r--sys/v4l2/gstv4l2videodec.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/gst/isomp4/gstqtmux.c b/gst/isomp4/gstqtmux.c
index 8d2943e2b..b1e83e6a8 100644
--- a/gst/isomp4/gstqtmux.c
+++ b/gst/isomp4/gstqtmux.c
@@ -473,7 +473,7 @@ gst_qt_mux_base_init (gpointer g_class)
longname = g_strdup_printf ("%s Muxer", params->prop->long_name);
description = g_strdup_printf ("Multiplex audio and video into a %s file",
params->prop->long_name);
- gst_element_class_set_static_metadata (element_class, longname,
+ gst_element_class_set_metadata (element_class, longname,
"Codec/Muxer", description,
"Thiago Sousa Santos <thiagoss@embedded.ufcg.edu.br>");
g_free (longname);
diff --git a/sys/v4l2/gstv4l2videodec.c b/sys/v4l2/gstv4l2videodec.c
index 2f6c167dd..33f431ea0 100644
--- a/sys/v4l2/gstv4l2videodec.c
+++ b/sys/v4l2/gstv4l2videodec.c
@@ -1032,7 +1032,7 @@ gst_v4l2_video_dec_subclass_init (gpointer g_class, gpointer data)
gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
cdata->src_caps));
- gst_element_class_set_static_metadata (element_class, cdata->longname,
+ gst_element_class_set_metadata (element_class, cdata->longname,
"Codec/Decoder/Video", cdata->description,
"Nicolas Dufresne <nicolas.dufresne@collabora.com>");