Non-direct dmabuf uploads, just as direct dmabuf uploads, create EGL
images and thus GL textures of the same width as the imported image.
The input dmabuf line stride is not relevant to the resulting texture
in both cases.
This fixes the case where non-direct uploads of input dmabufs with line
stride larger than the width will for example cause glcolorconvert to
sample only the left part (width * bytes per pixel / stride) of the
image, causing a horizontally stretched and cropped output image.
{
struct DmabufUpload *dmabuf = impl;
GstVideoInfo *in_info = &dmabuf->upload->priv->in_info;
- GstVideoInfo *out_info = in_info;
+ GstVideoInfo *out_info = &dmabuf->out_info;
guint n_planes = GST_VIDEO_INFO_N_PLANES (in_info);
GstVideoMeta *meta;
guint n_mem;
}
}
- if (dmabuf->direct) {
- if (out_caps != dmabuf->out_caps) {
- dmabuf->out_caps = out_caps;
- if (!gst_video_info_from_caps (&dmabuf->out_info, out_caps))
- return FALSE;
- }
- out_info = &dmabuf->out_info;
+ if (out_caps != dmabuf->out_caps) {
+ dmabuf->out_caps = out_caps;
+ if (!gst_video_info_from_caps (out_info, out_caps))
+ return FALSE;
}
if (dmabuf->params)