gl: download: Fix the wrong transformed result from src direction in transform_caps().
authorHe Junyan <junyan.he@intel.com>
Mon, 1 Mar 2021 15:33:29 +0000 (23:33 +0800)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 3 Mar 2021 02:43:01 +0000 (02:43 +0000)
commit2f3033cebe3c76042beb6139577de3be43d726d5
treef44cf14f4026786892608f16936c5089b5c642f4
parentccebcaa58695cfa578450531afc3cf8b968dcc1a
gl: download: Fix the wrong transformed result from src direction in transform_caps().

The current manner in transform_caps() for src direction is not very correct. For example,
when the src caps is:
  video/x-raw(memory:DMABuf); video/x-raw; video/x-raw(memory:GLMemory)
this function returns:
  video/x-raw(memory:DMABuf); video/x-raw; video/x-raw(memory:GLMemory)
as the sink caps. This is not correct, because DMABuf feature is not even in the sink pad's
caps template. The correct answer should be:
  video/x-raw(memory:GLMemory); video/x-raw
only.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1058>
ext/gl/gstgldownloadelement.c