Skip to content

Commit 2f95e94

Browse files
Address code review: fix comments, use List<> type alias, add Collections.Generic using
Co-authored-by: YimingZhanshen <76594627+YimingZhanshen@users.noreply.github.com>
1 parent 3265eb7 commit 2f95e94

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

AirPlay/Listeners/AudioListener.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@ private int RaopRtpResendCallback(Socket cSocket, ushort control_seqnum, ushort
690690
/// <summary>
691691
/// Wraparound-aware comparison for 16-bit sequence numbers.
692692
/// Returns true if s1 is strictly before s2 in the circular sequence space.
693-
/// Uses the standard approach: (s1 - s2) interpreted as signed 16-bit > 0 means s2 is ahead.
693+
/// When (s1 - s2) interpreted as signed 16-bit is negative, s1 is before s2.
694694
/// </summary>
695695
private static bool SeqBefore(ushort s1, ushort s2)
696696
{

AirPlay/Services/VideoOutputService.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using System.Collections.Generic;
23
using System.Diagnostics;
34
using System.IO;
45
using System.IO.Pipes;
@@ -29,7 +30,7 @@ public class VideoOutputService : IDisposable
2930
private CancellationTokenSource _cts;
3031
private Task _acceptTask;
3132
private Process _ffplayProcess;
32-
private System.Collections.Generic.List<byte[]> _pendingFrames = new System.Collections.Generic.List<byte[]>();
33+
private List<byte[]> _pendingFrames = new List<byte[]>();
3334
private bool _hasReceivedKeyFrame = false;
3435

3536
public event EventHandler<string> OnStatusChanged;
@@ -359,7 +360,7 @@ public void WriteFrame(H264Data data)
359360
if (!_connected)
360361
{
361362
// Buffer frames until ffplay connects.
362-
// On a new keyframe, discard older buffered frames (start fresh from latest IDR).
363+
// On a new keyframe, discard older buffered frames (start fresh from latest keyframe).
363364
if (isKeyFrame)
364365
{
365366
_pendingFrames.Clear();

0 commit comments

Comments
 (0)