mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-05-13 03:38:55 +00:00
eglglessink: Fix GstContext refcounting
This commit is contained in:
parent
e8ad67f2b4
commit
f398742608
1 changed files with 3 additions and 0 deletions
|
@ -157,6 +157,7 @@ gst_egl_adaptation_init_egl_display (GstEglAdaptationContext * ctx)
|
|||
context = gst_context_make_writable (context);
|
||||
gst_context_set_egl_display (context, ctx->display);
|
||||
gst_element_set_context (GST_ELEMENT_CAST (ctx->element), context);
|
||||
gst_context_unref (context);
|
||||
} else {
|
||||
GstContext *context;
|
||||
|
||||
|
@ -174,6 +175,7 @@ gst_egl_adaptation_init_egl_display (GstEglAdaptationContext * ctx)
|
|||
|
||||
msg = gst_message_new_have_context (GST_OBJECT (ctx->element), context);
|
||||
gst_element_post_message (GST_ELEMENT_CAST (ctx->element), msg);
|
||||
context = NULL;
|
||||
|
||||
context = gst_element_get_context (GST_ELEMENT_CAST (ctx->element));
|
||||
if (!context)
|
||||
|
@ -181,6 +183,7 @@ gst_egl_adaptation_init_egl_display (GstEglAdaptationContext * ctx)
|
|||
context = gst_context_make_writable (context);
|
||||
gst_context_set_egl_display (context, ctx->display);
|
||||
gst_element_set_context (GST_ELEMENT_CAST (ctx->element), context);
|
||||
gst_context_unref (context);
|
||||
}
|
||||
|
||||
if (!eglInitialize (gst_egl_display_get (ctx->display),
|
||||
|
|
Loading…
Reference in a new issue