Fix infinite loop in building interleaved streams

Incorrect timestamp comparison was leading to infinite loop
This commit is contained in:
Srivats P 2023-04-21 17:11:43 +05:30
parent f56ce2e2ec
commit d1d2a5c1b5

View File

@ -668,7 +668,7 @@ int AbstractPort::updatePacketListInterleaved()
sec++;
nsec -= long(1e9);
}
} while ((sec < durSec) || (nsec < durNsec));
} while ((sec < durSec) || ((sec == durSec) && (nsec < durNsec)));
// XXX: Ideally, for interleaved mode, we have a single packet set and
// the set's delay should be 0.
@ -757,7 +757,7 @@ int AbstractPort::updatePacketListInterleaved()
sec++;
nsec -= long(1e9);
}
} while ((sec < durSec) || (nsec < durNsec));
} while ((sec < durSec) || ((sec == durSec) && (nsec < durNsec)));
{
qint64 delaySec = durSec - lastPktTxSec;