[vlc-commits] [Git][videolan/vlc][master] bitmapheader: fix alpha mask reading

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Sep 21 13:21:58 UTC 2023



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
dd73c3e0 by Steve Lhomme at 2023-09-21T11:03:01+00:00
bitmapheader: fix alpha mask reading

It was already bogus when it was introduced 3274eb71594d55419631243f547025d88a06bc68.

Or the goal is to only support alpha with BGRA...

It is written properly in CreateBitmapInfoHeader().

- - - - -


1 changed file:

- modules/demux/avi/bitmapinfoheader.h


Changes:

=====================================
modules/demux/avi/bitmapinfoheader.h
=====================================
@@ -149,7 +149,7 @@ static inline int ParseBitmapInfoHeader( VLC_BITMAPINFOHEADER *p_bih, size_t i_b
                 video_format_FixRgb( &fmt->video );
                 if( i_bihextra >= 4 * sizeof(uint32_t) ) /* Alpha channel ? */
                 {
-                    uint32_t i_alpha = GetDWLE( &p_bihextra[8] );
+                    uint32_t i_alpha = GetDWLE( &p_bihextra[12] );
                     if( i_alpha == 0xFF )
                     {
                         switch (fmt->i_codec)



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/dd73c3e0a07a552fbd00e3279772ddbfd6e2b29d

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/dd73c3e0a07a552fbd00e3279772ddbfd6e2b29d
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list