From 58b07ecb3fdbb0f5c55cd482610d12bda69fed20 Mon Sep 17 00:00:00 2001 From: softworkz Date: Tue, 4 Jan 2022 02:30:31 +0100 Subject: [PATCH] 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 Signed-off-by: rcombs --- libavcodec/dvdsubdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c index 2aa6983490..30fe4d41de 100644 --- a/libavcodec/dvdsubdec.c +++ b/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;