vtenc: Fix setting of quality property

gst_vtenc_set_quality() will never actually set the VT compression
property, because it tries to set it on self->session which is not
initialized at this point.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7232>
This commit is contained in:
Nirbheek Chauhan 2024-07-25 03:03:41 +05:30 committed by GStreamer Marge Bot
parent c623f2db21
commit 3621b82c63

View file

@ -615,8 +615,8 @@ gst_vtenc_set_quality (GstVTEnc * self, gdouble quality)
{ {
GST_OBJECT_LOCK (self); GST_OBJECT_LOCK (self);
self->quality = quality; self->quality = quality;
GST_INFO_OBJECT (self, "setting quality %f", quality);
if (self->session != NULL) { if (self->session != NULL) {
GST_INFO_OBJECT (self, "setting quality %f", quality);
gst_vtenc_session_configure_property_double (self, self->session, gst_vtenc_session_configure_property_double (self, self->session,
kVTCompressionPropertyKey_Quality, quality); kVTCompressionPropertyKey_Quality, quality);
} }
@ -1588,7 +1588,8 @@ gst_vtenc_create_session (GstVTEnc * self)
gst_vtenc_get_realtime (self)); gst_vtenc_get_realtime (self));
gst_vtenc_session_configure_allow_frame_reordering (self, session, gst_vtenc_session_configure_allow_frame_reordering (self, session,
gst_vtenc_get_allow_frame_reordering (self)); gst_vtenc_get_allow_frame_reordering (self));
gst_vtenc_set_quality (self, self->quality); gst_vtenc_session_configure_property_double (self, session,
kVTCompressionPropertyKey_Quality, self->quality);
if (self->dump_properties) { if (self->dump_properties) {
gst_vtenc_session_dump_properties (self, session); gst_vtenc_session_dump_properties (self, session);