Commit 4a3294ef authored by Joakim Plate's avatar Joakim Plate Committed by Michael Niedermayer

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

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 8fd1da5b
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment