]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/dvbsub.c
Merge commit '118dd4a321a2d67f67c21b076abd0b4d939ab642'
[ffmpeg] / libavcodec / dvbsub.c
index 3cdbade99c429ee231b830b0034fbbeb9108e6a2..8cce702a9e002c652ec7084296be45f789fd2144 100644 (file)
@@ -239,9 +239,9 @@ static void dvb_encode_rle8(uint8_t **pq,
             x += len;
         }
         /* end of line */
-        // 00000000 00000000 end of 8-bit/pixel_code_string
-        *q++ = 0x00;
+        // 00000000 end of 8-bit/pixel_code_string
         *q++ = 0x00;
+        *q++ = 0xf0;
         bitmap += linesize;
     }
     *pq = q;
@@ -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;
         }