diff --git a/Common/Classes/Disposables/BaseDisposable.cs b/Common/Classes/Disposables/BaseDisposable.cs index f8fbfde1..37d9c2f2 100644 --- a/Common/Classes/Disposables/BaseDisposable.cs +++ b/Common/Classes/Disposables/BaseDisposable.cs @@ -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; } } /// diff --git a/Rtp/RtpClient.Methods.cs b/Rtp/RtpClient.Methods.cs index 3b33be95..5b7a4a05 100644 --- a/Rtp/RtpClient.Methods.cs +++ b/Rtp/RtpClient.Methods.cs @@ -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) @@ -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.)