mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
ljpeg: use the correct number of components in yuv
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
This commit is contained in:
parent
8aa3500905
commit
a030279a67
@ -711,10 +711,9 @@ static int ljpeg_decode_rgb_scan(MJpegDecodeContext *s, int predictor,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int ljpeg_decode_yuv_scan(MJpegDecodeContext *s, int predictor,
|
static int ljpeg_decode_yuv_scan(MJpegDecodeContext *s, int predictor,
|
||||||
int point_transform)
|
int point_transform, int nb_components)
|
||||||
{
|
{
|
||||||
int i, mb_x, mb_y;
|
int i, mb_x, mb_y;
|
||||||
const int nb_components = 3;
|
|
||||||
|
|
||||||
for (mb_y = 0; mb_y < s->mb_height; mb_y++) {
|
for (mb_y = 0; mb_y < s->mb_height; mb_y++) {
|
||||||
for (mb_x = 0; mb_x < s->mb_width; mb_x++) {
|
for (mb_x = 0; mb_x < s->mb_width; mb_x++) {
|
||||||
@ -1098,7 +1097,8 @@ next_field:
|
|||||||
return ret;
|
return ret;
|
||||||
} else {
|
} else {
|
||||||
if ((ret = ljpeg_decode_yuv_scan(s, predictor,
|
if ((ret = ljpeg_decode_yuv_scan(s, predictor,
|
||||||
point_transform)) < 0)
|
point_transform,
|
||||||
|
nb_components)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user