Skip to content

Commit

Permalink
Core (LV::Video): Add BI_BITFIELDS #define in BMP loader for clarity.
Browse files Browse the repository at this point in the history
  • Loading branch information
kaixiong committed Jan 25, 2025
1 parent 0b41ed7 commit 54a9d7e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions libvisual/libvisual/private/lv_video_bmp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,12 @@
#include <istream>
#include <cstring>

#define BI_RGB 0
#define BI_RLE8 1
#define BI_RLE4 2
/* BMP compression methods */
#define BI_RGB 0
#define BI_RLE8 1
#define BI_RLE4 2
#define BI_BITFIELDS 3


namespace LV {

Expand Down Expand Up @@ -343,7 +346,7 @@ namespace LV {
return nullptr;
}

if (bi_compression >= 3) {
if (bi_compression >= BI_BITFIELDS) {
visual_log (VISUAL_LOG_ERROR, "Bitmap uses an invalid or unsupported compression scheme");
fp.seekg (saved_stream_pos);
return nullptr;
Expand Down

0 comments on commit 54a9d7e

Please sign in to comment.