]> git.sesse.net Git - vlc/commitdiff
Do not check rgb masks for YUV in GetFfmpegChroma.
authorLaurent Aimar <fenrir@videolan.org>
Thu, 3 Sep 2009 19:04:54 +0000 (21:04 +0200)
committerLaurent Aimar <fenrir@videolan.org>
Thu, 3 Sep 2009 19:04:54 +0000 (21:04 +0200)
modules/codec/avcodec/chroma.c

index 6e13170a3485f731c4cea5d59f3cc38dc7353ca0..2a248b4dbb3d2a159bd4e34b9d278b3139e031ba 100644 (file)
@@ -134,9 +134,12 @@ int GetFfmpegChroma( int *i_ffmpeg_chroma, const video_format_t fmt )
     {
         if( chroma_table[i].i_chroma == fmt.i_chroma )
         {
-            if( chroma_table[i].i_rmask == fmt.i_rmask &&
-                chroma_table[i].i_gmask == fmt.i_gmask &&
-                chroma_table[i].i_bmask == fmt.i_bmask )
+            if( ( chroma_table[i].i_rmask == 0 &&
+                  chroma_table[i].i_gmask == 0 &&
+                  chroma_table[i].i_bmask == 0 ) ||
+                ( chroma_table[i].i_rmask == fmt.i_rmask &&
+                  chroma_table[i].i_gmask == fmt.i_gmask &&
+                  chroma_table[i].i_bmask == fmt.i_bmask ) )
             {
                 *i_ffmpeg_chroma = chroma_table[i].i_chroma_id;
                 return VLC_SUCCESS;