]> git.sesse.net Git - vlc/blobdiff - modules/codec/avcodec/chroma.c
Allocated mod16 D3D surfaces.
[vlc] / 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;