1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
From: =?utf-8?q?Fran=C3=A7ois_Cartegnie?= <fcvlcdev@free.fr>
Date: Tue, 11 Jun 2024 17:26:11 +0700
Subject: demux: avi: do not set up invalid bitsperpixel
UINT16_MAX is set and propagated from the bitmap header reader
refs #28661
---
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 4a8296d..7059ca9 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;
|