[551/906] GstGLOverlay: fix loading of non-square overlays

libjpeg complains about "Application read too {many,few} scan lines" in non-square images
This commit is contained in:
Matthew Waters 2012-07-16 22:40:15 +10:00
parent b34d014918
commit 8ae1fd34e0

View file

@ -659,7 +659,7 @@ gst_gl_overlay_load_jpeg (GstGLFilter * filter)
overlay->format = GL_RGB;
overlay->pixbuf = (GLubyte *) malloc (sizeof (GLubyte) * overlay->width
* overlay->height * overlay->internalFormat);
for (i = 0; i < overlay->width; ++i) {
for (i = 0; i < overlay->height; ++i) {
j = (overlay->pixbuf +
(((int) overlay->height - (i +
1)) * (int) overlay->width * overlay->internalFormat));