summaryrefslogtreecommitdiff
path: root/libavcodec/dvbsubdec.c
diff options
context:
space:
mode:
authorJoakim Plate <elupus@ecce.se>2011-09-10 23:12:29 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-09-10 23:12:29 +0200
commit4a3294ef0069c898a495c783dfdb2f0bf1dc6583 (patch)
tree268368605b98fdde2005c873a237b1397c34b232 /libavcodec/dvbsubdec.c
parent8fd1da5bd2661ea93c7f9e1eab22d5ed43389e1c (diff)
dvbsubdec: don't hardcode subtitle colors count in dvbsubdec to 16
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dvbsubdec.c')
-rw-r--r--libavcodec/dvbsubdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c
index 1ee7aad5d1..ad213c88f1 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;