You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
lavc/jpeg2000dec: Fix used variables reading palette.
Affected files with palette and colour-depth < 8.
This commit is contained in:
@@ -2039,13 +2039,13 @@ static int jp2_find_codestream(Jpeg2000DecoderContext *s)
|
|||||||
}
|
}
|
||||||
if (colour_depth[1] <= 8) {
|
if (colour_depth[1] <= 8) {
|
||||||
g = bytestream2_get_byteu(&s->g) << 8 - colour_depth[1];
|
g = bytestream2_get_byteu(&s->g) << 8 - colour_depth[1];
|
||||||
r |= r >> colour_depth[1];
|
g |= g >> colour_depth[1];
|
||||||
} else {
|
} else {
|
||||||
g = bytestream2_get_be16u(&s->g) >> colour_depth[1] - 8;
|
g = bytestream2_get_be16u(&s->g) >> colour_depth[1] - 8;
|
||||||
}
|
}
|
||||||
if (colour_depth[2] <= 8) {
|
if (colour_depth[2] <= 8) {
|
||||||
b = bytestream2_get_byteu(&s->g) << 8 - colour_depth[2];
|
b = bytestream2_get_byteu(&s->g) << 8 - colour_depth[2];
|
||||||
r |= r >> colour_depth[2];
|
b |= b >> colour_depth[2];
|
||||||
} else {
|
} else {
|
||||||
b = bytestream2_get_be16u(&s->g) >> colour_depth[2] - 8;
|
b = bytestream2_get_be16u(&s->g) >> colour_depth[2] - 8;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user