vlc | branch: master | Francois Cartegnie <fcvlc...@free.fr> | Thu Nov 16 
23:22:50 2017 +0100| [96d506563f90b2c1401a80dd1dfc5b75c61c3633] | committer: 
Francois Cartegnie

demux: avi: set proper BGR masks (fix #19088)

seems video output has changed to RGB24 being RGB
while vlc has started with BGR from avi

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=96d506563f90b2c1401a80dd1dfc5b75c61c3633
---

 modules/demux/avi/avi.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/demux/avi/avi.c b/modules/demux/avi/avi.c
index b5cb00fa6f..a769a07a75 100644
--- a/modules/demux/avi/avi.c
+++ b/modules/demux/avi/avi.c
@@ -589,12 +589,12 @@ static int Open( vlc_object_t * p_this )
                     switch( tk->fmt.i_codec )
                     {
                     case VLC_CODEC_RGB24:
-                    case VLC_CODEC_RGB32:
-                        tk->fmt.video.i_rmask = 0x00ff0000;
+                    case VLC_CODEC_RGB32: /* BGR (see biBitCount) */
+                        tk->fmt.video.i_bmask = 0x00ff0000;
                         tk->fmt.video.i_gmask = 0x0000ff00;
-                        tk->fmt.video.i_bmask = 0x000000ff;
+                        tk->fmt.video.i_rmask = 0x000000ff;
                         break;
-                    case VLC_CODEC_RGB15:
+                    case VLC_CODEC_RGB15: /* RGB (B least 5 bits) */
                         tk->fmt.video.i_rmask = 0x7c00;
                         tk->fmt.video.i_gmask = 0x03e0;
                         tk->fmt.video.i_bmask = 0x001f;

_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to