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

softworkz git at videolan.org
Sat Apr 9 12:46:25 EEST 2022


ffmpeg | branch: master | softworkz <softworkz at hotmail.com> | Tue Jan  4 02:30:31 2022 +0100| [58b07ecb3fdbb0f5c55cd482610d12bda69fed20] | committer: rcombs

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 at hotmail.com>
Signed-off-by: rcombs <rcombs at rcombs.me>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=58b07ecb3fdbb0f5c55cd482610d12bda69fed20
---

 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;



More information about the ffmpeg-cvslog mailing list