vlc | branch: master | Steve Lhomme <[email protected]> | Tue Jan 29 15:59:23 
2019 +0100| [eeb662bca2ab1dfd8e027606be84f7906b175a76] | committer: Hugo 
Beauzée-Luyssen

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 <[email protected]>

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

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

diff --git a/modules/video_chroma/copy.c b/modules/video_chroma/copy.c
index cb48fd25f7..57e2ba2385 100644
--- a/modules/video_chroma/copy.c
+++ b/modules/video_chroma/copy.c
@@ -920,7 +920,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);
         }

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

Reply via email to