vlc | branch: master | Martin Storsjö <[email protected]> | Tue Mar 12 15:19:41 
2013 +0200| [1e6949f6be6422c2fa73e7d22df1074b32c209f6] | committer: Martin 
Storsjö

opengl: Take w.num into account when calculating the buffer size

Signed-off-by: Martin Storsjö <[email protected]>

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

 modules/video_output/opengl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/video_output/opengl.c b/modules/video_output/opengl.c
index 193db2c..2dc1e9c 100644
--- a/modules/video_output/opengl.c
+++ b/modules/video_output/opengl.c
@@ -710,7 +710,7 @@ int vout_display_opengl_Prepare(vout_display_opengl_t *vgl,
         if ( (picture->p[j].i_pitch / picture->p[j].i_pixel_pitch) != 
(unsigned int)
              ( picture->format.i_visible_width * vgl->chroma->p[j].w.num / 
vgl->chroma->p[j].w.den ) )
         {
-            uint8_t *new_plane = malloc( picture->format.i_visible_width * 
vgl->fmt.i_visible_height * vgl->chroma->p[j].h.num / (vgl->chroma->p[j].h.den 
*  vgl->chroma->p[j].w.den ) );
+            uint8_t *new_plane = malloc( picture->format.i_visible_width * 
vgl->fmt.i_visible_height * vgl->chroma->p[j].w.num * vgl->chroma->p[j].h.num / 
(vgl->chroma->p[j].h.den * vgl->chroma->p[j].w.den ) );
             uint8_t *destination = new_plane;
             const uint8_t *source = picture->p[j].p_pixels;
 

_______________________________________________
vlc-commits mailing list
[email protected]
http://mailman.videolan.org/listinfo/vlc-commits

Reply via email to