From 4a3294ef0069c898a495c783dfdb2f0bf1dc6583 Mon Sep 17 00:00:00 2001 From: Joakim Plate Date: Sat, 10 Sep 2011 23:12:29 +0200 Subject: [PATCH] dvbsubdec: don't hardcode subtitle colors count in dvbsubdec to 16 Signed-off-by: Michael Niedermayer --- libavcodec/dvbsubdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c index 1ee7aad5d..ad213c88f 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; -- 2.11.0