mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 15:27:07 +00:00
gl/sink: make sure we always initialize the upload object
https://bugzilla.gnome.org/show_bug.cgi?id=729542
This commit is contained in:
parent
7dfd308e8c
commit
6f4fd70867
1 changed files with 12 additions and 0 deletions
|
@ -687,9 +687,21 @@ gst_glimage_sink_set_caps (GstBaseSink * bsink, GstCaps * caps)
|
|||
gst_object_unref (oldpool);
|
||||
}
|
||||
|
||||
if (glimage_sink->upload)
|
||||
gst_object_unref (glimage_sink->upload);
|
||||
glimage_sink->upload = gst_object_ref (GST_GL_BUFFER_POOL (newpool)->upload);
|
||||
|
||||
if (!gst_gl_upload_init_format (glimage_sink->upload, &vinfo))
|
||||
goto upload_error;
|
||||
|
||||
return TRUE;
|
||||
|
||||
upload_error:
|
||||
{
|
||||
GST_ELEMENT_ERROR (glimage_sink, RESOURCE, NOT_FOUND,
|
||||
("%s", "Failed to initialize upload resources"), (NULL));
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
static GstFlowReturn
|
||||
|
|
Loading…
Reference in a new issue