mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-29 19:50:40 +00:00
avcfg: Properly initalize GValue
.. to the expected property value type.
This commit is contained in:
parent
ad1f3a914b
commit
a3c72b2148
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue