diff mbox series

[FFmpeg-devel] avcodec/dvdsubdec: fix incorrect yellow appearance of dvd subtitles

Message ID pull.16.ffstaging.FFmpeg.1641262759164.ffmpegagent@gmail.com
State New
Headers show
Series [FFmpeg-devel] avcodec/dvdsubdec: fix incorrect yellow appearance of dvd subtitles
Related show


Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc fail Make fate failed

Commit Message

ffmpegagent Jan. 4, 2022, 2:19 a.m. UTC
From: softworkz <softworkz@hotmail.com>

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>
    avcodec/dvdsubdec: fix incorrect yellow appearance of dvd subtitles
    Fixes an age-old bug in decoding DVD subtitles.
    Ever wondered why certain DVD subtitles are shown in yellow color when
    ffmpeg is involved...

Published-As: https://github.com/ffstaging/FFmpeg/releases/tag/pr-ffstaging-16%2Fsoftworkz%2Fpatch_dvdsubdec_fix-v1
Fetch-It-Via: git fetch https://github.com/ffstaging/FFmpeg pr-ffstaging-16/softworkz/patch_dvdsubdec_fix-v1
Pull-Request: https://github.com/ffstaging/FFmpeg/pull/16

 libavcodec/dvdsubdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

base-commit: 573b6b8a607398c5f34108efda9c29d41c5727ff
diff mbox series


diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c
index 52259f0730..a3fdb535a5 100644
--- a/libavcodec/dvdsubdec.c
+++ b/libavcodec/dvdsubdec.c
@@ -400,7 +400,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;