lavc/jpeg2000dec: Use a define to clarify the meaning of a constant.
authorCarl Eugen Hoyos <ceffmpeg@gmail.com>
Tue, 22 May 2018 10:54:32 +0000 (12:54 +0200)
committerCarl Eugen Hoyos <ceffmpeg@gmail.com>
Tue, 22 May 2018 10:54:32 +0000 (12:54 +0200)
libavcodec/jpeg2000dec.c

index 12dcc5c..5fa9b9d 100644 (file)
@@ -2063,7 +2063,7 @@ static int jp2_find_codestream(Jpeg2000DecoderContext *s)
                     size = (colour_depth[0] + 7 >> 3) * colour_count +
                            (colour_depth[1] + 7 >> 3) * colour_count +
                            (colour_depth[2] + 7 >> 3) * colour_count;
-                    if (colour_count > 256   ||
+                    if (colour_count > AVPALETTE_COUNT ||
                         colour_channels != 3 ||
                         colour_depth[0] > 16 ||
                         colour_depth[1] > 16 ||