X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/d3eca61ede32dd385b2e53fb33c669efa26cbcfb..84007236ce796615a8e74432aad110164b23b8ec:/lib/dvb/subtitle.cpp diff --git a/lib/dvb/subtitle.cpp b/lib/dvb/subtitle.cpp index b0c90222..642327bb 100644 --- a/lib/dvb/subtitle.cpp +++ b/lib/dvb/subtitle.cpp @@ -345,6 +345,8 @@ int eDVBSubtitleParser::subtitle_process_segment(__u8 *segment) } } + page->state = page_state; + //eDebug("page updated: old: %d, new: %d", page->page_version_number, page_version_number); // when acquisition point or mode change: remove all displayed pages. if ((page_state == 1) || (page_state == 2)) @@ -360,6 +362,13 @@ int eDVBSubtitleParser::subtitle_process_segment(__u8 *segment) { subtitle_region *p = page->regions->next; //eDebug("delete region %d", page->regions->region_id); + while(page->regions->region_objects) + { + //eDebug("delete region object"); + subtitle_region_object *ob = page->regions->region_objects->next; + delete page->regions->region_objects; + page->regions->region_objects = ob; + } delete page->regions; page->regions = p; } @@ -451,6 +460,7 @@ int eDVBSubtitleParser::subtitle_process_segment(__u8 *segment) else if (region->region_version_number != region_version_number) { subtitle_region_object *objects = region->region_objects; + //eDebug("unequal version %p %p", objects, objects?objects->next:objects); while (objects) { subtitle_region_object *n = objects->next; @@ -748,10 +758,10 @@ int eDVBSubtitleParser::subtitle_process_segment(__u8 *segment) void eDVBSubtitleParser::subtitle_process_pes(__u8 *pkt, int len) { - //eDebugNoNewLine("subtitle_process_pes"); + eDebugNoNewLine("subtitle_process_pes"); if (!extract_pts(m_show_time, pkt)) { - //eDebug(" %lld", m_show_time); + eDebug(" %lld", m_show_time); pkt += 6; len -= 6; // skip PES header pkt++; len--; @@ -786,8 +796,8 @@ void eDVBSubtitleParser::subtitle_process_pes(__u8 *pkt, int len) if (len && *pkt != 0xFF) eDebug("strange data at the end"); } - //else - //eDebug("\ndvb subtitle packet without PTS.. ignore!!"); + else + eDebug("\ndvb subtitle packet without PTS.. ignore!!"); } void eDVBSubtitleParser::subtitle_redraw_all() @@ -796,7 +806,8 @@ void eDVBSubtitleParser::subtitle_redraw_all() subtitle_page *page = m_pages; while(page) { - subtitle_redraw(page->page_id); + if (page->state != 0) + subtitle_redraw(page->page_id); page = page->next; } #else