Removed two unnecessary threads in the RtspSetupResponse.
This commit is contained in:
parent
f8521c0b62
commit
1d7c9c3807
@ -55,15 +55,7 @@ namespace skyscraper8.SatIp.RtspResponses
|
||||
|
||||
rtpCancellation = new CancellationTokenSource();
|
||||
rtcpCancellation = new CancellationTokenSource();
|
||||
rtpThread = new Thread(RtpThread);
|
||||
rtcpThread = new Thread(RtcpThread);
|
||||
rtpThread.Start();
|
||||
rtcpThread.Start();
|
||||
listenersStarted = true;
|
||||
}
|
||||
|
||||
private void RtpThread()
|
||||
{
|
||||
Task.Run(async () =>
|
||||
{
|
||||
byte[] buffer = new byte[2048];
|
||||
@ -78,10 +70,7 @@ namespace skyscraper8.SatIp.RtspResponses
|
||||
exitedThread++;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
private void RtcpThread()
|
||||
{
|
||||
Task.Run(async () =>
|
||||
{
|
||||
byte[] buffer = new byte[2048];
|
||||
@ -96,7 +85,10 @@ namespace skyscraper8.SatIp.RtspResponses
|
||||
exitedThread++;
|
||||
}
|
||||
);
|
||||
|
||||
listenersStarted = true;
|
||||
}
|
||||
|
||||
|
||||
internal void InvokeCancellationTokens()
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user