]> git.sesse.net Git - ffmpeg/commitdiff
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 3cdbade99c429ee231b830b0034fbbeb9108e6a2..04c0c60626f372cc8d70d35cbc4de285f916c831 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;
         }