Merge branch 'master' of git.opendreambox.org:/git/enigma2
[enigma2.git] / lib / dvb / subtitle.cpp
index b0c90222996ef71eb76b7d6a948ef4f45cd6caba..f4b5b7e415f23dbbafc81fdb90bc7cdf7d9b2be2 100644 (file)
@@ -360,6 +360,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 +458,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 +756,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 +794,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()