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-6+rpi1^2~120 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=b2c371704df25e19b6be1538f7fdd8df597470d1;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;