[FFmpeg-cvslog] dvbsubdec: don't hardcode subtitle colors count in dvbsubdec to 16

Joakim Plate git at videolan.org
Wed Sep 21 21:08:33 CEST 2011


ffmpeg | branch: release/0.8 | Joakim Plate <elupus at ecce.se> | Sat Sep 10 23:12:29 2011 +0200| [92f1b5df320613b5af3e34a634f506524a7aaa2a] | committer: Michael Niedermayer

dvbsubdec: don't hardcode subtitle colors count in dvbsubdec to 16

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 4a3294ef0069c898a495c783dfdb2f0bf1dc6583)

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

 libavcodec/dvbsubdec.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c
index 5b09eb1..e43dd29 100644
--- a/libavcodec/dvbsubdec.c
+++ b/libavcodec/dvbsubdec.c
@@ -1360,7 +1360,7 @@ static int dvbsub_display_end_segment(AVCodecContext *avctx, const uint8_t *buf,
         rect->y = display->y_pos + offset_y;
         rect->w = region->width;
         rect->h = region->height;
-        rect->nb_colors = 16;
+        rect->nb_colors = (1 << region->depth);
         rect->type      = SUBTITLE_BITMAP;
         rect->pict.linesize[0] = region->width;
 



More information about the ffmpeg-cvslog mailing list