<html><head><meta http-equiv="content-type" content="text/html; charset=us-ascii"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">You can set fractions as:<div><br></div><div>gint num=4;</div><div>gint den=3;</div><div>g_object_set( G_OBJECT( crop ), "aspect-ratio", num, den, NULL );</div><div><div><br><blockquote type="cite"><div>On 23 Jun 2023, at 16:24, cfd new via gstreamer-devel <gstreamer-devel@lists.freedesktop.org> wrote:</div><br class="Apple-interchange-newline"><div><div><div class="yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div dir="ltr" data-setdir="false">I have a pipeline with element <span>aspectratiocrop. When I tried to set <span>aspect-ratio with</span></span></div><div dir="ltr" data-setdir="false">std::string crop_str( "4/3" );<br></div><div dir="ltr" data-setdir="false">auto crop = gst_element_factory_make(<span><span> "aspectratiocrop", nullptr </span></span>);<br></div><div dir="ltr" data-setdir="false">g_object_set( G_OBJECT( crop ), "aspect-ratio", crop_str.c_str(), nullptr );</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">the app complains about <br></div><div dir="ltr" data-setdir="false">passed '0' as denometer for GstFraction. <br></div><div dir="ltr" data-setdir="false">How to set it properly?</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">   Joe<br></div></div></div></div></blockquote></div><br></div></body></html>