{
//eDebug("end of display set segment");
subtitle_redraw_all();
+ m_seen_eod = true;
}
case 0xFF: // stuffing
break;
return;
}
+ m_seen_eod = false;
+
while (len && *pkt == 0x0F)
{
int l = subtitle_process_segment(pkt);
pkt += l;
len -= l;
}
+
if (len && *pkt != 0xFF)
eDebug("strange data at the end");
+
+ if (!m_seen_eod)
+ subtitle_redraw_all();
}
else
- eDebug("\ndvb subtitle packet without PTS.. ignore!!");
+ eDebug("");
}
void eDVBSubtitleParser::subtitle_redraw_all()
{
case subtitle_region::bpp2:
// eDebug("2BPP");
- entries = clut->entries_2bit;
+ if (clut)
+ entries = clut->entries_2bit;
memset(palette, 0, 4*sizeof(gRGB));
palette[0].a = 0xFF;
palette[2].r = palette[2].g = palette[2].b = 0xFF;
break;
case subtitle_region::bpp4:
// eDebug("4BPP");
- entries = clut->entries_4bit;
+ if (clut)
+ entries = clut->entries_4bit;
memset(palette, 0, 16*sizeof(gRGB));
for (int i=0; i < 16; ++i)
{
break;
case subtitle_region::bpp8:
// eDebug("8BPP");
- entries = clut->entries_8bit;
- memset(palette, 0, 16*sizeof(gRGB));
+ if (clut)
+ entries = clut->entries_8bit;
+ memset(palette, 0, 256*sizeof(gRGB));
for (int i=0; i < 256; ++i)
{
switch (i & 17)
break;
}
- if (clut)
+ if (entries)
{
for (int i=0; i<clut_size; ++i)
{
pts_t m_show_time;
Signal1<void,const eDVBSubtitlePage&> m_new_subtitle_page;
int m_composition_page_id, m_ancillary_page_id;
+ bool m_seen_eod;
public:
eDVBSubtitleParser(iDVBDemux *demux);
virtual ~eDVBSubtitleParser();