Browse Source

lavc/dvbsub: Do not fail hard in the region block for 256-colour encoding.

Adds a hunk forgotten in 8a6799d2
tags/n4.0
JULIAN GARDNER Carl Eugen Hoyos 8 years ago
parent
commit
df95f145be
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      libavcodec/dvbsub.c

+ 3
- 0
libavcodec/dvbsub.c View File

@@ -342,6 +342,9 @@ static int encode_dvb_subtitles(DVBSubtitleContext *s,
} else if (h->rects[region_id]->nb_colors <= 16) {
/* 4 bpp, standard encoding */
bpp_index = 1;
} else if (h->rects[region_id]->nb_colors <= 256) {
/* 8 bpp, standard encoding */
bpp_index = 2;
} else {
return -1;
}


Loading…
Cancel
Save