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:
Nicolas Dufresne 2015-03-01 09:43:32 -05:00 committed by Tim-Philipp Müller
parent 7c32611c87
commit 50c491dd36

View file

@ -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);
}