Fixed TS input last packet being dropped
This commit is contained in:
parent
e58a24c239
commit
2bb80d5868
1 changed files with 11 additions and 3 deletions
|
@ -306,16 +306,24 @@ namespace Mist {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (feof(inFile)){
|
||||
tsStream.finish();
|
||||
hasPacket = true;
|
||||
}
|
||||
if (!hasPacket) {
|
||||
return;
|
||||
}
|
||||
if (selectedTracks.size() == 1) {
|
||||
tsStream.getPacket(*selectedTracks.begin(), thisPacket);
|
||||
if (tsStream.hasPacket(*selectedTracks.begin())){
|
||||
tsStream.getPacket(*selectedTracks.begin(), thisPacket);
|
||||
}
|
||||
} else {
|
||||
tsStream.getEarliestPacket(thisPacket);
|
||||
if (tsStream.hasPacket()){
|
||||
tsStream.getEarliestPacket(thisPacket);
|
||||
}
|
||||
}
|
||||
if (!thisPacket){
|
||||
FAIL_MSG("Could not getNext TS packet!");
|
||||
INFO_MSG("Could not getNext TS packet!");
|
||||
return;
|
||||
}
|
||||
tsStream.initializeMetadata(myMeta);
|
||||
|
|
Loading…
Add table
Reference in a new issue