mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
va: sink reference at instantiation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6398>
This commit is contained in:
parent
b18483a563
commit
0d48ede4a9
3 changed files with 10 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue