also show dvb subtitles with wrong coded subtitling type in pmt
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Tue, 21 Oct 2008 16:15:40 +0000 (16:15 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Tue, 21 Oct 2008 16:15:40 +0000 (16:15 +0000)
lib/dvb/pmt.cpp

index 940d2e7dc325fffcc35fd35b78c8d5617c18a1f4..39a2c3d71ccc8a38ee0992264fb27a8ee97c5764 100644 (file)
@@ -251,11 +251,22 @@ int eDVBServicePMTHandler::getProgramInfo(struct program &program)
                                                                        for (SubtitlingConstIterator it(list->begin()); it != list->end(); ++it)
                                                                        {
                                                                                s.subtitling_type = (*it)->getSubtitlingType();
+                                                                               switch(s.subtitling_type)
+                                                                               {
+                                                                               case 0x10 ... 0x13:
+                                                                               case 0x20 ... 0x23: // dvb subtitles
+                                                                                       break;
+                                                                               default:
+                                                                                       eDebug("dvb subtitle %s PID %04x with wrong subtitling type (%02x)... force 0x10!!",
+                                                                                               s.language_code.c_str(), s.pid, s.subtitling_type);
+                                                                                       s.subtitling_type = 0x10;
+                                                                                       break;
+                                                                               }
                                                                                s.composition_page_id = (*it)->getCompositionPageId();
                                                                                s.ancillary_page_id = (*it)->getAncillaryPageId();
                                                                                s.language_code = (*it)->getIso639LanguageCode();
-       //                                                                      eDebug("add dvb subtitle %s PID %04x, type %d, composition page %d, ancillary_page %d",
-       //                                                                              s.language_code.c_str(), s.pid, s.subtitling_type, s.composition_page_id, s.ancillary_page_id);
+//                                                                             eDebug("add dvb subtitle %s PID %04x, type %d, composition page %d, ancillary_page %d",
+//                                                                                     s.language_code.c_str(), s.pid, s.subtitling_type, s.composition_page_id, s.ancillary_page_id);
                                                                                program.subtitleStreams.push_back(s);
                                                                        }
                                                                        break;