diff options
author | JULIAN GARDNER <joolzg@btinternet.com> | 2013-09-04 22:51:34 +0100 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2013-09-21 09:51:09 +0200 |
commit | 97ff584af432b4ad77c388b201a6861bfeb95e3f (patch) | |
tree | 18c97e6db1bd31c8e52cff90e1b06aef68c501c1 /libavcodec/dvbsubdec.c | |
parent | f76b633a94e19dc8aca0b80143272ce9b497f94c (diff) | |
download | ffmpeg-97ff584af432b4ad77c388b201a6861bfeb95e3f.tar.gz |
Apply clut changes only to one table.
The specification does not allow multiple bits to be set,
but some encoders do it anyway.
Applying it only to the first seems to give better results.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Diffstat (limited to 'libavcodec/dvbsubdec.c')
-rw-r--r-- | libavcodec/dvbsubdec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c index 955925a619..faa510a858 100644 --- a/libavcodec/dvbsubdec.c +++ b/libavcodec/dvbsubdec.c @@ -1015,9 +1015,9 @@ static void dvbsub_parse_clut_segment(AVCodecContext *avctx, if (depth & 0x80) clut->clut4[entry_id] = RGBA(r,g,b,255 - alpha); - if (depth & 0x40) + else if (depth & 0x40) clut->clut16[entry_id] = RGBA(r,g,b,255 - alpha); - if (depth & 0x20) + else if (depth & 0x20) clut->clut256[entry_id] = RGBA(r,g,b,255 - alpha); } } |