Fixed TS live input
This commit is contained in:
parent
401c323564
commit
492dcd03f5
1 changed files with 13 additions and 12 deletions
|
@ -229,11 +229,12 @@ namespace TS{
|
||||||
bool parsePes = false;
|
bool parsePes = false;
|
||||||
|
|
||||||
int packNum = 1;
|
int packNum = 1;
|
||||||
|
// Usually we append a packet at a time, so the start code is expected to show up at the end.
|
||||||
std::deque<Packet> &inStream = pesStreams[tid];
|
std::deque<Packet> &inStream = pesStreams[tid];
|
||||||
if (!inStream.rbegin()->getUnitStart()){
|
if (inStream.rbegin()->getUnitStart()){
|
||||||
if (threaded){globalSem.post();}
|
parsePes = true;
|
||||||
return;
|
}else{
|
||||||
}
|
//But, sometimes (e.g. live) we do multiples, and need to check all of it...
|
||||||
std::deque<Packet>::iterator lastPack = inStream.end();
|
std::deque<Packet>::iterator lastPack = inStream.end();
|
||||||
std::deque<Packet>::iterator curPack = inStream.begin();
|
std::deque<Packet>::iterator curPack = inStream.begin();
|
||||||
curPack++;
|
curPack++;
|
||||||
|
@ -242,7 +243,7 @@ namespace TS{
|
||||||
packNum++;
|
packNum++;
|
||||||
}
|
}
|
||||||
if (curPack != lastPack){parsePes = true;}
|
if (curPack != lastPack){parsePes = true;}
|
||||||
|
}
|
||||||
if (threaded){globalSem.post();}
|
if (threaded){globalSem.post();}
|
||||||
|
|
||||||
if (parsePes){parsePES(tid);}
|
if (parsePes){parsePES(tid);}
|
||||||
|
@ -697,7 +698,7 @@ namespace TS{
|
||||||
if (threaded){globalSem.post();}
|
if (threaded){globalSem.post();}
|
||||||
|
|
||||||
if (!packetReady){
|
if (!packetReady){
|
||||||
ERROR_MSG("Obtaining a packet on track %lu failed", tid);
|
ERROR_MSG("Track %lu: PES without valid packets?", tid);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue