dvbsuboverlay: Fix 8-bit subpicture rendering.

Fix 2 small flaws handling 8-bit subpictures that makes
my one test file work.
This commit is contained in:
Jan Schmidt 2014-03-25 21:40:10 +11:00
parent 24c1ae72d3
commit 0a19be4464

View file

@ -490,9 +490,10 @@ _dvb_sub_parse_region_segment (DvbSub * dvb_sub, guint16 page_id, guint8 * buf,
region->clut = *buf++;
if (region->depth == 8)
if (region->depth == 8) {
region->bgcolor = *buf++;
else {
buf += 1; /* Skip undefined 4-bit and 2-bit field */
} else {
buf += 1;
if (region->depth == 4)
@ -914,6 +915,8 @@ _dvb_sub_read_8bit_string (guint8 * destbuf, gint dbuf_len,
GST_LOG ("Returning with %u pixels read", pixels_read);
*srcbuf += (gst_bit_reader_get_pos (&gb) + 7) >> 3;
// FIXME: Shouldn't need this variable if tracking things in the loop better
return pixels_read;
}