From b70edbff150324466517d137f8a72cb8e963e775 Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Mon, 12 May 2014 12:59:59 -0400 Subject: [PATCH] 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. --- gst-libs/gst/gl/gstglupload.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/gst-libs/gst/gl/gstglupload.c b/gst-libs/gst/gl/gstglupload.c index 30ea9db691..400dd2b322 100644 --- a/gst-libs/gst/gl/gstglupload.c +++ b/gst-libs/gst/gl/gstglupload.c @@ -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);