From: François Cartegnie Date: Tue, 11 Jun 2024 10:26:11 +0000 (+0700) Subject: demux: avi: do not set up invalid bitsperpixel X-Git-Tag: archive/raspbian/3.0.21-7+rpi1^2~121 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=c4a43fc28469f941da59fc180130d9b7b05a4f11;p=vlc.git demux: avi: do not set up invalid bitsperpixel UINT16_MAX is set and propagated from the bitmap header reader refs #28661 Gbp-Pq: Name 0005-demux-avi-do-not-set-up-invalid-bitsperpixel.patch --- diff --git a/modules/demux/avi/avi.c b/modules/demux/avi/avi.c index 4a8296d8..7059ca96 100644 --- a/modules/demux/avi/avi.c +++ b/modules/demux/avi/avi.c @@ -737,7 +737,8 @@ static int Open( vlc_object_t * p_this ) tk->fmt.video.i_width = p_bih->biWidth; tk->fmt.video.i_visible_height = tk->fmt.video.i_height = p_bih->biHeight; - tk->fmt.video.i_bits_per_pixel = p_bih->biBitCount; + if( p_bih->biBitCount <= 32 ) + tk->fmt.video.i_bits_per_pixel = p_bih->biBitCount; tk->fmt.video.i_frame_rate = tk->i_rate; tk->fmt.video.i_frame_rate_base = tk->i_scale;