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>
release/5.1
softworkz 3 years ago committed by rcombs
parent aa0829d834
commit 58b07ecb3f
  1. 2
      libavcodec/dvdsubdec.c

@ -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;

Loading…
Cancel
Save