Merge branch 'master' into experimental
[enigma2.git] / lib / dvb / pmt.cpp
index ee89a3a43a93a55133f838c2d1aa34e27fdc2798..ea4b96c55238d872bdd9ffe3644ba9d18571746c 100644 (file)
@@ -133,11 +133,11 @@ void eDVBServicePMTHandler::PATready(int)
        {
                int pmtpid = -1;
                std::vector<ProgramAssociationSection*>::const_iterator i;
-               for (i = ptr->getSections().begin(); i != ptr->getSections().end(); ++i)
+               for (i = ptr->getSections().begin(); pmtpid == -1 && i != ptr->getSections().end(); ++i)
                {
                        const ProgramAssociationSection &pat = **i;
                        ProgramAssociationConstIterator program;
-                       for (program = pat.getPrograms()->begin(); program != pat.getPrograms()->end(); ++program)
+                       for (program = pat.getPrograms()->begin(); pmtpid == -1 && program != pat.getPrograms()->end(); ++program)
                                if (eServiceID((*program)->getProgramNumber()) == m_reference.getServiceID())
                                        pmtpid = (*program)->getProgramMapPid();
                }