mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
glbufferpool: Fix offset for odd height
We also need to recalculate the offset, since otherwise the frame mapping will be forward two lines in the U and V planes (I420) due to gst_video_info_align() round up the Y plane to a even number of lines. https://bugzilla.gnome.org/show_bug.cgi?id=745054
This commit is contained in:
parent
7c32611c87
commit
50c491dd36
1 changed files with 2 additions and 1 deletions
|
@ -172,9 +172,10 @@ gst_gl_buffer_pool_set_config (GstBufferPool * pool, GstStructure * config)
|
|||
glpool->upload = gst_gl_upload_meta_new (glpool->context);
|
||||
}
|
||||
|
||||
/* Recalulate the size as we don't add padding between planes. */
|
||||
/* Recalulate the size and offset as we don't add padding between planes. */
|
||||
priv->info.size = 0;
|
||||
for (p = 0; p < GST_VIDEO_INFO_N_PLANES (&priv->info); p++) {
|
||||
priv->info.offset[p] = priv->info.size;
|
||||
priv->info.size +=
|
||||
gst_gl_get_plane_data_size (&priv->info, &priv->valign, p);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue