From 423b6a7e493828dd91d5e590e0905236f1f46557 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Thu, 7 Sep 2023 00:09:10 +0200 Subject: avutil/imgutils: Add wrapper for av_image_copy() to avoid casts av_image_copy() accepts const uint8_t* const * as source; lots of user have uint8_t* const * and therefore either cast (the majority) or copy the array of pointers. This commit changes this by adding a static inline wrapper for av_image_copy() that casts between the two types so that we do not need to add casts everywhere else. Signed-off-by: Andreas Rheinhardt --- libavdevice/xv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libavdevice/xv.c') diff --git a/libavdevice/xv.c b/libavdevice/xv.c index b3d79d57a8..cba933ef17 100644 --- a/libavdevice/xv.c +++ b/libavdevice/xv.c @@ -315,8 +315,8 @@ static int write_picture(AVFormatContext *s, uint8_t *input_data[4], } } - av_image_copy(data, img->pitches, (const uint8_t **)input_data, linesize, - xv->image_format, img->width, img->height); + av_image_copy2(data, img->pitches, input_data, linesize, + xv->image_format, img->width, img->height); return xv_repaint(s); } -- cgit v1.2.3