diff mbox series

[FFmpeg-devel] avdevice/xv: Increase array size

Message ID AM7PR03MB6660668114AB4029B69C66638FB39@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit 9b17273c77ee2868ef34abc49efa70260453235b
Headers show
Series [FFmpeg-devel] avdevice/xv: Increase array size | expand


Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Andreas Rheinhardt Oct. 9, 2021, 11:17 a.m. UTC
av_image_copy() expects an array of four pointers according to its
declaration; although it currently only touches pointers that
are actually in use (depending upon the pixel format) this might
change at any time (as has already happened for the linesizes
in d7bc52bf456deba0f32d9fe5c288ec441f1ebef5).

This fixes ticket #9264 as well as a warning from GCC 11.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
 libavdevice/xv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


Paul B Mahol Oct. 9, 2021, 11:23 a.m. UTC | #1
diff mbox series


diff --git a/libavdevice/xv.c b/libavdevice/xv.c
index 24ba3179f6..a346f8e306 100644
--- a/libavdevice/xv.c
+++ b/libavdevice/xv.c
@@ -296,7 +296,7 @@  static int write_picture(AVFormatContext *s, uint8_t *input_data[4],
     XVContext *xv = s->priv_data;
     XvImage *img = xv->yuv_image;
-    uint8_t *data[3] = {
+    uint8_t *data[4] = {
         img->data + img->offsets[0],
         img->data + img->offsets[1],
         img->data + img->offsets[2]