Fixed DTSC input bug with ping commands
This commit is contained in:
parent
ba2ef09a7e
commit
8f38872ffc
1 changed files with 63 additions and 52 deletions
|
@ -233,6 +233,7 @@ namespace Mist {
|
||||||
void inputDTSC::getNext(bool smart) {
|
void inputDTSC::getNext(bool smart) {
|
||||||
if (!needsLock()){
|
if (!needsLock()){
|
||||||
thisPacket.reInit(srcConn);
|
thisPacket.reInit(srcConn);
|
||||||
|
while (config->is_active){
|
||||||
if (thisPacket.getVersion() == DTSC::DTCM){
|
if (thisPacket.getVersion() == DTSC::DTCM){
|
||||||
nProxy.userClient.keepAlive();
|
nProxy.userClient.keepAlive();
|
||||||
std::string cmd;
|
std::string cmd;
|
||||||
|
@ -269,16 +270,14 @@ namespace Mist {
|
||||||
INFO_MSG("Reset: deleting track %d", *it);
|
INFO_MSG("Reset: deleting track %d", *it);
|
||||||
myMeta.tracks.erase(*it);
|
myMeta.tracks.erase(*it);
|
||||||
}
|
}
|
||||||
|
thisPacket.reInit(srcConn);//read the next packet before continuing
|
||||||
//Read next packet before returning
|
|
||||||
return getNext(smart);
|
|
||||||
}else{
|
}else{
|
||||||
myMeta = DTSC::Meta();
|
myMeta = DTSC::Meta();
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
//Read next packet before returning
|
thisPacket.reInit(srcConn);//read the next packet before continuing
|
||||||
thisPacket.reInit(srcConn);
|
|
||||||
}
|
}
|
||||||
|
continue;//parse the next packet before returning
|
||||||
}else if (thisPacket.getVersion() == DTSC::DTSC_HEAD){
|
}else if (thisPacket.getVersion() == DTSC::DTSC_HEAD){
|
||||||
DTSC::Meta newMeta;
|
DTSC::Meta newMeta;
|
||||||
newMeta.reinit(thisPacket);
|
newMeta.reinit(thisPacket);
|
||||||
|
@ -294,7 +293,19 @@ namespace Mist {
|
||||||
myMeta.tracks[*it] = newMeta.tracks[*it];
|
myMeta.tracks[*it] = newMeta.tracks[*it];
|
||||||
continueNegotiate(*it, true);
|
continueNegotiate(*it, true);
|
||||||
}
|
}
|
||||||
return getNext(smart);
|
thisPacket.reInit(srcConn);//read the next packet before continuing
|
||||||
|
continue;//parse the next packet before returning
|
||||||
|
}
|
||||||
|
//We now know we have either a data packet, or an error.
|
||||||
|
if (!thisPacket.getTrackId()){
|
||||||
|
if (thisPacket.getVersion() == DTSC::DTSC_V2){
|
||||||
|
WARN_MSG("Received bad packet for stream %s: %llu@%llu", streamName.c_str(), thisPacket.getTrackId(), thisPacket.getTime());
|
||||||
|
}else{
|
||||||
|
//All types except data packets are handled above, so if it's not a V2 data packet, we assume corruption
|
||||||
|
WARN_MSG("Invalid packet header for stream %s", streamName.c_str());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return;//we have a packet
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
if (smart) {
|
if (smart) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue