<html><head></head><body><div>On Wed, 2023-05-10 at 18:35 +0000, cfd new via gstreamer-devel wrote:</div><div><br></div><div>Hi,</div><div><br></div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div class="ydp7e708552yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div dir="ltr" data-setdir="false"><div>  GParamSpec * property_spec = g_object_class_find_property( G_OBJECT_GET_CLASS( decoder ), "compliance" );<br>  GType prop_type = G_PARAM_SPEC_VALUE_TYPE( property_spec );<br>  GValue value = { 0 };<br>  g_value_init( &value, prop_type );<br><div>  gst_value_deserialize( &value, "flexible" );</div><div dir="ltr" data-setdir="false">  value has the correct index 3=flexible.</div><div dir="ltr" data-setdir="false"><div><br></div><div>But</div><span><pre><code>g_object_set( decoder, "compliance", <span>value</span>, nullptr );<br>crashes.<br><br></code></pre></span></div></div></div></div></blockquote><div><br></div><div>Yes. g_object_set() expects an integer for an enum property, not a GValue structure.</div><div><br></div><div style="margin-left: 3ch;">g_object_set_property(G_OBJECT (decoder), "compliance", &value);</div><div><br></div><div>might work for a GValue though.</div><div><br></div><div>This should also work:</div><div><div><span style="caret-color: rgb(38, 40, 42); color: rgb(38, 40, 42); font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 13px;"></span></div></div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">   </span>gst_util_set_object_arg( G_OBJECT( decoder ), "compliance", "flexible" );</div><div><br></div><div>Or this:</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">       </span>g_object_set (decoder, "compliance", 3, NULL);</div><div><br></div><div>Cheers</div><div> Tim</div><div><span></span></div></body></html>