mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-06-08 17:19:25 +00:00
glimagesink: set last sample disabled if input is "external-oes"
The last sample causes error log of: gstglmemory.c:926:_gl_tex_copy: Cannot copy External OES textures So we should disable last sample if the input is "external-oes".
This commit is contained in:
parent
0233a2a7cf
commit
b216e1dd0c
|
@ -1652,6 +1652,7 @@ gst_glimage_sink_set_caps (GstBaseSink * bsink, GstCaps * caps)
|
|||
GstGLImageSink *glimage_sink;
|
||||
gboolean ok;
|
||||
GstVideoInfo vinfo;
|
||||
GstStructure *structure;
|
||||
|
||||
GST_DEBUG_OBJECT (bsink, "set caps with %" GST_PTR_FORMAT, caps);
|
||||
|
||||
|
@ -1673,6 +1674,15 @@ gst_glimage_sink_set_caps (GstBaseSink * bsink, GstCaps * caps)
|
|||
|
||||
GST_GLIMAGE_SINK_UNLOCK (glimage_sink);
|
||||
|
||||
structure = gst_caps_get_structure (caps, 0);
|
||||
if (gst_structure_has_field_typed
|
||||
(structure, "texture-target", G_TYPE_STRING)) {
|
||||
const gchar *str = gst_structure_get_string (structure, "texture-target");
|
||||
|
||||
if (g_strcmp0 (str, GST_GL_TEXTURE_TARGET_EXTERNAL_OES_STR) == 0)
|
||||
gst_base_sink_set_last_sample_enabled (bsink, FALSE);
|
||||
}
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue