Skip at least some corruption in TS
This commit is contained in:
parent
98c50762e8
commit
0fff6f8773
6 changed files with 25 additions and 18 deletions
|
@ -178,8 +178,8 @@ std::string AnalyserTS::printPES(const std::string &d, unsigned long PID){
|
|||
counter = 0;
|
||||
}
|
||||
res << std::hex << std::setw(2) << std::setfill('0') << (int)(d[i] & 0xff) << " ";
|
||||
counter++;
|
||||
if ((counter) % 32 == 31){res << std::endl;}
|
||||
counter++;
|
||||
}
|
||||
res << std::endl;
|
||||
}
|
||||
|
|
|
@ -273,6 +273,9 @@ namespace Mist {
|
|||
if (packet.getUnitStart()){
|
||||
while (tsStream.hasPacketOnEachTrack()) {
|
||||
tsStream.getEarliestPacket(headerPack);
|
||||
if (!headerPack){
|
||||
break;
|
||||
}
|
||||
if (!myMeta.tracks.count(headerPack.getTrackId()) || !myMeta.tracks[headerPack.getTrackId()].codec.size()) {
|
||||
tsStream.initializeMetadata(myMeta, headerPack.getTrackId());
|
||||
}
|
||||
|
@ -302,13 +305,13 @@ namespace Mist {
|
|||
void inputTS::getNext(bool smart) {
|
||||
INSANE_MSG("Getting next");
|
||||
thisPacket.null();
|
||||
bool hasPacket = (selectedTracks.size() == 1 ? tsStream.hasPacket(*selectedTracks.begin()) : tsStream.hasPacketOnEachTrack());
|
||||
bool hasPacket = (selectedTracks.size() == 1 ? tsStream.hasPacket(*selectedTracks.begin()) : tsStream.hasPacket());
|
||||
while (!hasPacket && !feof(inFile) && (inputProcess == 0 || Util::Procs::childRunning(inputProcess)) && config->is_active) {
|
||||
tsBuf.FromFile(inFile);
|
||||
if (selectedTracks.count(tsBuf.getPID())) {
|
||||
tsStream.parse(tsBuf, 0);//bPos == 0
|
||||
if (tsBuf.getUnitStart()){
|
||||
hasPacket = (selectedTracks.size() == 1 ? tsStream.hasPacket(*selectedTracks.begin()) : tsStream.hasPacketOnEachTrack());
|
||||
hasPacket = (selectedTracks.size() == 1 ? tsStream.hasPacket(*selectedTracks.begin()) : tsStream.hasPacket());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -906,7 +906,7 @@ namespace Mist{
|
|||
stats();
|
||||
}
|
||||
if (nProxy.curPage[tid].mapped[tmp.offset] == 0){
|
||||
FAIL_MSG("Track %d no data (key %u@%llu) - timeout", tid, getKeyForTime(tid, pos) + (getNextKey?1:0), tmp.offset);
|
||||
FAIL_MSG("Track %d no data (key %u@%u) - timeout", tid, getKeyForTime(tid, pos) + (getNextKey?1:0), tmp.offset);
|
||||
}else{
|
||||
return seek(tid, pos, getNextKey);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue