Skip to content

Commit

Permalink
small cleanup .
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusfriedman committed Nov 26, 2023
1 parent d33dec1 commit 29a26a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Common/Classes/Disposables/BaseDisposable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ public virtual ValueTask DisposeAsync()
bool IDisposed.IsDisposed
{
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
get { return (!IsUndisposed || IsFinalized is true) && IsDisposed; }
get { return (IsUndisposed is false || IsFinalized) && IsDisposed; }
}

/// <summary>
Expand Down
6 changes: 3 additions & 3 deletions Rtp/RtpClient.Methods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1817,13 +1817,13 @@ private int ReadApplicationLayerFraming(ref int received, ref int sessionRequire
{
//Determine if Rtcp is expected
//Perform another lookup and check compatibility
expectRtcp = !(incompatible = Common.IDisposedExtensions.IsNullOrDisposed(GetContextBySourceId(header.SendersSynchronizationSourceIdentifier)));
expectRtcp = (incompatible = Common.IDisposedExtensions.IsNullOrDisposed(GetContextBySourceId(header.SendersSynchronizationSourceIdentifier))) is false;
}
}
}

//May be mixing channels...
if (expectRtcp is false && relevent.InDiscovery is false)
if (expectRtcp is false/* && relevent.InDiscovery is false*/)
{
//Rtp
if (remainingInBuffer <= sessionRequired + Rtp.RtpHeader.Length)
Expand All @@ -1842,7 +1842,7 @@ private int ReadApplicationLayerFraming(ref int received, ref int sessionRequire
//The context was obtained by the frameChannel
//Use the SSRC to determine where it should be handled.
//If there is no context the packet is incompatible
expectRtp = !(incompatible = Common.IDisposedExtensions.IsNullOrDisposed(GetContextBySourceId(header.SynchronizationSourceIdentifier)));
expectRtp = (incompatible = Common.IDisposedExtensions.IsNullOrDisposed(GetContextBySourceId(header.SynchronizationSourceIdentifier))) is false;

//(Could also check SequenceNumber to prevent duplicate packets from being processed.)

Expand Down

0 comments on commit 29a26a6

Please sign in to comment.