From c8746a49d8b95ba4c29af0047ce9f75dd5de1dc9 Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Mon, 5 Feb 2018 14:17:09 +0100 Subject: [PATCH] chroma:copy: use the proper defines to access the planes in picture_SwapUV() --- modules/video_chroma/copy.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/video_chroma/copy.c b/modules/video_chroma/copy.c index 35721ebc93..626dc34f05 100644 --- a/modules/video_chroma/copy.c +++ b/modules/video_chroma/copy.c @@ -832,9 +832,9 @@ void picture_SwapUV(picture_t *picture) { assert(picture->i_planes == 3); - plane_t tmp_plane = picture->p[1]; - picture->p[1] = picture->p[2]; - picture->p[2] = tmp_plane; + plane_t tmp_plane = picture->p[U_PLANE]; + picture->p[U_PLANE] = picture->p[V_PLANE]; + picture->p[V_PLANE] = tmp_plane; } int picture_UpdatePlanes(picture_t *picture, uint8_t *data, unsigned pitch) -- 2.11.4.GIT