diff options
author | Nicolas Dufresne <nicolas.dufresne@collabora.com> | 2014-05-12 12:59:59 -0400 |
---|---|---|
committer | Nicolas Dufresne <nicolas.dufresne@collabora.com> | 2014-05-12 18:26:12 -0400 |
commit | 864e1511c7cf38c1c24e1c41816bb75f71f52916 (patch) | |
tree | 46dbbba537ba188d7c6c56a77f8f8ff76ab4131c | |
parent | 4f84a6124a719c2a9c927b5e91b36f5d5b20d617 (diff) | |
download | gstreamer-plugins-bad-864e1511c7cf38c1c24e1c41816bb75f71f52916.tar.gz |
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.
-rw-r--r-- | gst-libs/gst/gl/gstglupload.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gst-libs/gst/gl/gstglupload.c b/gst-libs/gst/gl/gstglupload.c index 30ea9db69..400dd2b32 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); |