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

JULIAN GARDNER git at videolan.org
Tue Oct 24 23:51:50 EEST 2017


ffmpeg | branch: master | JULIAN GARDNER <joolzg at btinternet.com> | Tue Oct 24 22:46:00 2017 +0200| [df95f145be1556da7e147d642e4fd8bf96276321] | committer: Carl Eugen Hoyos

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

Adds a hunk forgotten in 8a6799d2

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=df95f145be1556da7e147d642e4fd8bf96276321
---

 libavcodec/dvbsub.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/dvbsub.c b/libavcodec/dvbsub.c
index 3cdbade99c..04c0c60626 100644
--- a/libavcodec/dvbsub.c
+++ b/libavcodec/dvbsub.c
@@ -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;
         }



More information about the ffmpeg-cvslog mailing list