[vlc-commits] demux: avi: use enum for compressions

Francois Cartegnie git at videolan.org
Thu Nov 23 00:50:41 CET 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Nov 22 20:48:46 2017 +0100| [5640f9814c4ed2edb9b33086f3465837e1fc4adc] | committer: Francois Cartegnie

demux: avi: use enum for compressions

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

 modules/demux/avi/avi.c    |  5 +----
 modules/demux/avi/libavi.h | 13 +++++++++++++
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/modules/demux/avi/avi.c b/modules/demux/avi/avi.c
index 5e050d635c..21bf37613e 100644
--- a/modules/demux/avi/avi.c
+++ b/modules/demux/avi/avi.c
@@ -58,9 +58,6 @@
     "Recreate a index for the AVI file. Use this if your AVI file is damaged "\
     "or incomplete (not seekable)." )
 
-#define BI_RAWRGB 0x00
-#define BI_RGBBITFIELDS 0x03
-
 static int  Open ( vlc_object_t * );
 static void Close( vlc_object_t * );
 
@@ -558,7 +555,7 @@ static int Open( vlc_object_t * p_this )
                 es_format_Init( &tk->fmt, VIDEO_ES,
                         AVI_FourccGetCodec( VIDEO_ES, p_vids->p_bih->biCompression ) );
 
-                if( p_vids->p_bih->biCompression == BI_RAWRGB )
+                if( p_vids->p_bih->biCompression == BI_RGB )
                 {
                     switch( p_vids->p_bih->biBitCount )
                     {
diff --git a/modules/demux/avi/libavi.h b/modules/demux/avi/libavi.h
index 1a686f0bfe..e1c283bc01 100644
--- a/modules/demux/avi/libavi.h
+++ b/modules/demux/avi/libavi.h
@@ -20,6 +20,19 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
+enum biCompression
+{
+    BI_RGB = 0x00,
+    BI_RLE8,
+    BI_RLE4,
+    BI_BITFIELDS,
+    BI_JPEG,
+    BI_PNG,
+    BI_CMYK = 0x0B,
+    BI_CMYKRLE8,
+    BI_CMYKRLE4
+};
+
 /* flags for use in <dwFlags> in AVIFileHdr */
 #define AVIF_HASINDEX       0x00000010  /* Index at end of file? */
 #define AVIF_MUSTUSEINDEX   0x00000020



More information about the vlc-commits mailing list