<html><head></head><body><div class="ydpde5a0bb5yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;" dir="ltr" data-setdir="false"><div></div><div>Hi, Tim<br></div><div><br></div><div>    int 3 will work and &value works as well. Thanks a lot.</div><div><br></div><div dir="ltr" data-setdir="false">    Joe<br></div><div><br></div>
        
        </div><div id="yahoo_quoted_4455643868" class="yahoo_quoted">
            <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                
                <div>
                    On Wednesday, May 10, 2023, 07:45:37 p.m. EDT, Tim-Philipp Müller via gstreamer-devel <gstreamer-devel@lists.freedesktop.org> wrote:
                </div>
                <div><br></div>
                <div><br></div>
                <div><div id="yiv6683523938"><div><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 style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;" class="yiv6683523938ydp7e708552yahoo-style-wrap"><div dir="ltr"><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">  value has the correct index 3=flexible.</div><div dir="ltr"><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="">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="color:rgb(38, 40, 42);font-family:Helvetica, Arial, sans-serif;font-size:13px;"></span></div></div><div><br></div><div><span style="white-space:pre;" class="yiv6683523938Apple-tab-span">     </span>gst_util_set_object_arg( G_OBJECT( decoder ), "compliance", "flexible" );</div><div><br></div><div>Or this:</div><div><br></div><div><span style="white-space:pre;" class="yiv6683523938Apple-tab-span"> </span>g_object_set (decoder, "compliance", 3, NULL);</div><div><br></div><div>Cheers</div><div> Tim</div><div><span></span></div></div>
</div></div>
            </div>
        </div></body></html>