From 2c1fc0105372fcba469f1663bc931cb0c3154186 Mon Sep 17 00:00:00 2001 From: Alexandre Janniaux Date: Wed, 21 Feb 2024 18:40:52 +0100 Subject: [PATCH] video_chroma: yuvp: fix potentially undefined r,g,b,a r,g,b,a variables won't be defined if the function to initialize them fails. Signal that it can never happen because it was tested before. --- modules/video_chroma/yuvp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/video_chroma/yuvp.c b/modules/video_chroma/yuvp.c index 272347b91d..e7d5b059e3 100644 --- a/modules/video_chroma/yuvp.c +++ b/modules/video_chroma/yuvp.c @@ -128,7 +128,9 @@ static void Convert( filter_t *p_filter, picture_t *p_source, video_palette_t rgbp; int r, g, b, a; - GetPackedRgbIndexes(p_filter->fmt_out.video.i_chroma, &r, &g, &b, &a); + if (GetPackedRgbIndexes(p_filter->fmt_out.video.i_chroma, &r, &g, &b, &a) != VLC_SUCCESS) + vlc_assert_unreachable(); + /* Create a RGBA palette */ rgbp.i_entries = p_yuvp->i_entries; for( int i = 0; i < p_yuvp->i_entries; i++ )