va: sink reference at instantiation

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6398>
This commit is contained in:
Víctor Manuel Jáquez Leal 2024-03-15 19:03:58 +01:00 committed by GStreamer Marge Bot
parent b18483a563
commit 0d48ede4a9
3 changed files with 10 additions and 1 deletions

View file

@ -197,6 +197,8 @@ gst_va_decoder_new (GstVaDisplay * display, guint32 codec)
g_return_val_if_fail (GST_IS_VA_DISPLAY (display), NULL);
self = g_object_new (GST_TYPE_VA_DECODER, "display", display, NULL);
gst_object_ref_sink (self);
if (!gst_va_decoder_initialize (self, codec))
gst_clear_object (&self);

View file

@ -576,6 +576,8 @@ gst_va_encoder_new (GstVaDisplay * display, guint32 codec,
self = g_object_new (GST_TYPE_VA_ENCODER, "display", display,
"va-entrypoint", entrypoint, NULL);
gst_object_ref_sink (self);
if (!gst_va_encoder_initialize (self, codec))
gst_clear_object (&self);

View file

@ -171,9 +171,14 @@ gst_va_filter_init (GstVaFilter * self)
GstVaFilter *
gst_va_filter_new (GstVaDisplay * display)
{
GstVaFilter *self;
g_return_val_if_fail (GST_IS_VA_DISPLAY (display), NULL);
return g_object_new (GST_TYPE_VA_FILTER, "display", display, NULL);
self = g_object_new (GST_TYPE_VA_FILTER, "display", display, NULL);
gst_object_ref_sink (self);
return self;
}
gboolean