mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
glupload: Correctly update the video info from video meta
Using gst_video_info_set_format() isn't complete when updating a video info from video meta.
This commit is contained in:
parent
4f84a6124a
commit
864e1511c7
1 changed files with 10 additions and 1 deletions
|
@ -494,11 +494,20 @@ _gst_gl_upload_perform_for_gl_texture_upload_meta (GstVideoGLTextureUploadMeta *
|
|||
if (!upload->initted) {
|
||||
GstVideoInfo in_info;
|
||||
GstVideoMeta *v_meta = gst_buffer_get_video_meta (upload->priv->buffer);
|
||||
gint i;
|
||||
|
||||
if (v_meta == NULL)
|
||||
return FALSE;
|
||||
|
||||
gst_video_info_set_format (&in_info, v_meta->format, v_meta->width, v_meta->height);
|
||||
gst_video_info_init (&in_info);
|
||||
in_info.finfo = gst_video_format_get_info (v_meta->format);
|
||||
in_info.width = v_meta->width;
|
||||
in_info.height = v_meta->height;
|
||||
|
||||
for (i = 0; i < in_info.finfo->n_planes; i++) {
|
||||
in_info.offset[i] = v_meta->offset[i];
|
||||
in_info.stride[i] = v_meta->stride[i];
|
||||
}
|
||||
|
||||
_gst_gl_upload_set_format_unlocked (upload, &in_info);
|
||||
|
||||
|
|
Loading…
Reference in a new issue