summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsoftworkz <softworkz@hotmail.com>2022-01-04 02:30:31 +0100
committerrcombs <rcombs@rcombs.me>2022-04-09 04:45:28 -0500
commit58b07ecb3fdbb0f5c55cd482610d12bda69fed20 (patch)
tree9c20313f2e0d4ce43e054de3e61e23d08d22b60e
parentaa0829d834232b13e513fb88b2b9a2b74918e05c (diff)
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>
-rw-r--r--libavcodec/dvdsubdec.c2
1 files changed, 1 insertions, 1 deletions
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;