From a3c72b2148c8aafa3e747e298df95094e02d2a07 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Mon, 16 Jul 2018 08:44:45 +0200 Subject: [PATCH] avcfg: Properly initalize GValue .. to the expected property value type. --- ext/libav/gstavcfg.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ext/libav/gstavcfg.c b/ext/libav/gstavcfg.c index aee2c34767..6018dfecff 100644 --- a/ext/libav/gstavcfg.c +++ b/ext/libav/gstavcfg.c @@ -565,15 +565,17 @@ gst_ffmpeg_cfg_fill_context (GObject * object, AVCodecContext * context) for (i = 0; i < num_props; ++i) { GParamSpec *pspec = pspecs[i]; const AVOption *opt; - GValue value; + GValue value = G_VALUE_INIT; opt = g_param_spec_get_qdata (pspec, avoption_quark); if (!opt) continue; + g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (pspec)); g_object_get_property (object, pspec->name, &value); set_option_value (context, pspec, &value, opt); + g_value_unset (&value); } g_free (pspecs); }