Browse Source

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.
pull/162/head
Alexandre Janniaux 2 years ago
committed by Jean-Baptiste Kempf
parent
commit
2c1fc01053
  1. 4
      modules/video_chroma/yuvp.c

4
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++ )

Loading…
Cancel
Save