Skip to content

gl: upload: Do not provide allocator system memory for gl memory method

He Junyan requested to merge He_Junyan/gstreamer:gl_upload_fix_external-oes into main

The pipeline:

gst-launch-1.0 -vf videotestsrc ! "video/x-raw,format=NV12" ! glimagesink

will fail when we enable _direct_dma_buf_external_upload method. The root cause is that a GL memory pool is created in propose_allocation() by _gl_memory_upload method and the upstream element will misuse it even when system memory is negotiated between. For example, if the glupload outputs "texture-target=(string)external-oes" in its src caps, the _gl_memory_upload will reinterpret the input raw system memory as GL memory with "external-oes" target, but in fact, it is not.

Merge request reports