lavc/dvbsub: Do not fail hard in the region block for 256-colour encoding.
authorJULIAN GARDNER <joolzg@btinternet.com>
Tue, 24 Oct 2017 20:46:00 +0000 (22:46 +0200)
committerCarl Eugen Hoyos <ceffmpeg@gmail.com>
Tue, 24 Oct 2017 20:46:00 +0000 (22:46 +0200)
Adds a hunk forgotten in 8a6799d2

libavcodec/dvbsub.c

index 3cdbade..04c0c60 100644 (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;
         }