[vlc-commits] Corrected parameters given to glTexSubImage2D.

Laurent Aimar git at videolan.org
Wed May 25 23:21:18 CEST 2011


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Wed May 25 23:16:34 2011 +0200| [c1df3abb83d3fa8b26490a7cc4150e656b9d95bc] | committer: Laurent Aimar

Corrected parameters given to glTexSubImage2D.

The numerical values are the same, but they don't have the same meaning.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c1df3abb83d3fa8b26490a7cc4150e656b9d95bc
---

 modules/video_output/opengl.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/video_output/opengl.c b/modules/video_output/opengl.c
index 274e8fe..ce7d5ed 100644
--- a/modules/video_output/opengl.c
+++ b/modules/video_output/opengl.c
@@ -262,7 +262,8 @@ static int PictureLock(picture_t *picture)
     if (!vlc_gl_Lock(vgl->gl)) {
         glBindTexture(VLCGL_TARGET, get_texture(picture));
         glTexSubImage2D(VLCGL_TARGET, 0, 0, 0,
-                        vgl->fmt.i_width, vgl->fmt.i_height,
+                        picture->p[0].i_pitch / vgl->chroma->pixel_size,
+                        picture->p[0].i_lines,
                         VLCGL_FORMAT, VLCGL_TYPE, picture->p[0].p_pixels);
 
         vlc_gl_Unlock(vgl->gl);
@@ -410,7 +411,8 @@ int vout_display_opengl_Prepare(vout_display_opengl_t *vgl,
 #else
     /* Update the texture */
     glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0,
-                    vgl->fmt.i_width, vgl->fmt.i_height,
+                    picture->p[0].i_pitch / vgl->chroma->pixel_size,
+                    picture->p[0].i_lines,
                     VLCGL_FORMAT, VLCGL_TYPE, picture->p[0].p_pixels);
 #endif
 



More information about the vlc-commits mailing list