From c4a43fc28469f941da59fc180130d9b7b05a4f11 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fran=C3=A7ois=20Cartegnie?= Date: Tue, 11 Jun 2024 17:26:11 +0700 Subject: [PATCH] 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 --- modules/demux/avi/avi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.30.2