[FFmpeg-devel] [PATCH 2/2] Fix memory allocation problem. Related to ticket #9264.

houlei at uniontech.com houlei at uniontech.com
Wed Jun 9 05:31:45 EEST 2021


From: houlei <houlei at uniontech.com>

Signed-off-by: houlei <houlei at uniontech.com>
---
 libavdevice/xv.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavdevice/xv.c b/libavdevice/xv.c
index 24ba3179f6..7e15c178b6 100644
--- a/libavdevice/xv.c
+++ b/libavdevice/xv.c
@@ -296,10 +296,11 @@ 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]
+        img->data + img->offsets[2],
+        img->data + img->offsets[3]
     };
 
     /* Check messages. Window might get closed. */
-- 
2.20.1





More information about the ffmpeg-devel mailing list