Commit 1e6949f6 authored by Martin Storsjö's avatar Martin Storsjö

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

Signed-off-by: default avatarMartin Storsjö <martin@martin.st>
parent e4602073
...@@ -710,7 +710,7 @@ int vout_display_opengl_Prepare(vout_display_opengl_t *vgl, ...@@ -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) 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 ) ) ( 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; uint8_t *destination = new_plane;
const uint8_t *source = picture->p[j].p_pixels; const uint8_t *source = picture->p[j].p_pixels;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment