mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 04:31:06 +00:00
Fix GstVaapiDisplay refcounting in vaapidecode.
This commit is contained in:
parent
91c4c2c6b5
commit
76661d73d1
1 changed files with 9 additions and 4 deletions
|
@ -162,10 +162,15 @@ error_commit_buffer:
|
|||
static inline gboolean
|
||||
gst_vaapidecode_ensure_display(GstVaapiDecode *decode)
|
||||
{
|
||||
if (!decode->display)
|
||||
decode->display =
|
||||
gst_vaapi_display_lookup_downstream(GST_ELEMENT(decode));
|
||||
return decode->display != NULL;
|
||||
GstVaapiDisplay *display;
|
||||
|
||||
if (!decode->display) {
|
||||
display = gst_vaapi_display_lookup_downstream(GST_ELEMENT(decode));
|
||||
if (!display)
|
||||
return FALSE;
|
||||
decode->display = g_object_ref(display);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
Loading…
Reference in a new issue