1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

avcodec/dvdsubdec: fix incorrect yellow appearance of dvd subtitles

The guess_palette() implementation is questionable in itself
as its results don't match those from other DVD subtitle decoders.

This commit starts cleanup by fixing an obvious bug which has made
certain DVD subs appear yellow instead of white or grey for more than
10 years..

Signed-off-by: softworkz <softworkz@hotmail.com>
Signed-off-by: rcombs <rcombs@rcombs.me>
This commit is contained in:
softworkz 2022-01-04 02:30:31 +01:00 committed by rcombs
parent aa0829d834
commit 58b07ecb3f

View File

@ -401,7 +401,7 @@ static int decode_dvd_subtitles(DVDSubContext *ctx, AVSubtitle *sub_header,
} else {
sub_header->rects[0]->nb_colors = 4;
guess_palette(ctx, (uint32_t*)sub_header->rects[0]->data[1],
0xffff00);
0xffffff);
}
sub_header->rects[0]->x = x1;
sub_header->rects[0]->y = y1;