summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Schmidt <jan@centricular.com>2014-03-25 21:40:10 +1100
committerJan Schmidt <jan@centricular.com>2014-03-25 21:40:10 +1100
commit0a19be4464a3069ccba8cd5205de6de05ad8927f (patch)
tree78fbbc9a083e211d1d53671fb2a80dada1f8efce
parent24c1ae72d344c81aa16270f2cc17387a7af7175d (diff)
downloadgstreamer-plugins-bad-0a19be4464a3069ccba8cd5205de6de05ad8927f.tar.gz
dvbsuboverlay: Fix 8-bit subpicture rendering.
Fix 2 small flaws handling 8-bit subpictures that makes my one test file work.
-rw-r--r--gst/dvbsuboverlay/dvb-sub.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gst/dvbsuboverlay/dvb-sub.c b/gst/dvbsuboverlay/dvb-sub.c
index 72c878d82..c1509ee5a 100644
--- a/gst/dvbsuboverlay/dvb-sub.c
+++ b/gst/dvbsuboverlay/dvb-sub.c
@@ -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;
}