From b3af05c193231060e77f1f2507ab6dfd845a3da7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Sun, 19 Feb 2023 12:01:59 +0100 Subject: [PATCH] vah265enc: Use helper to update properties. This is a continuation of the original patch by Mengkejiergeli Ba Part-of: --- subprojects/gst-plugins-bad/sys/va/gstvah265enc.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/subprojects/gst-plugins-bad/sys/va/gstvah265enc.c b/subprojects/gst-plugins-bad/sys/va/gstvah265enc.c index f542158..796ec21 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvah265enc.c +++ b/subprojects/gst-plugins-bad/sys/va/gstvah265enc.c @@ -3382,8 +3382,7 @@ _h265_ensure_rate_control (GstVaH265Enc * self) GST_INFO_OBJECT (self, "target bitrate computed to %u kbps", bitrate); - self->prop.bitrate = bitrate; - g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_BITRATE]); + update_property_uint (base, &self->prop.bitrate, bitrate, PROP_BITRATE); } /* Adjust the setting based on RC mode. */ @@ -4284,10 +4283,8 @@ print_options: self->features.use_trellis = FALSE; } - if (self->prop.use_trellis != self->features.use_trellis) { - self->prop.use_trellis = self->features.use_trellis; - g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_TRELLIS]); - } + update_property_bool (base, &self->prop.use_trellis, + self->features.use_trellis, PROP_TRELLIS); } /* We need to decide the profile and entrypoint before call this. -- 2.7.4