Browse Source

video_chroma:copy: fix the number of lines for the second NV12 planes

The pitch is similar to the full picture, but there's half the lines.

Compared to I420 where the second/third planes have half width and half height.

https://hackerone.com/reports/485437

Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
(cherry picked from commit eeb662bca2)
Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
pull/135/head
Steve Lhomme 8 years ago
committed by Hugo Beauzée-Luyssen
parent
commit
4de0460617
  1. 2
      modules/video_chroma/copy.c

2
modules/video_chroma/copy.c

@ -969,7 +969,7 @@ int picture_UpdatePlanes(picture_t *picture, uint8_t *data, unsigned pitch)
p->p_pixels = o->p_pixels + o->i_lines * o->i_pitch;
p->i_pitch = pitch;
p->i_lines = picture->format.i_height;
p->i_lines = picture->format.i_height / 2;
assert(p->i_visible_pitch <= p->i_pitch);
assert(p->i_visible_lines <= p->i_lines);
}

Loading…
Cancel
Save