diff --git a/src/Yavsc/Services/LiveProcessor.cs b/src/Yavsc/Services/LiveProcessor.cs index c34affee..1f6da1e1 100644 --- a/src/Yavsc/Services/LiveProcessor.cs +++ b/src/Yavsc/Services/LiveProcessor.cs @@ -165,6 +165,7 @@ namespace Yavsc.Services received = await liveHandler.Socket.ReceiveAsync(sBuffer, liveHandler.TokenSource.Token); _logger.LogInformation($"Received bytes : {received.Count}"); + _logger.LogInformation($"segment : offset: {sBuffer.Offset} count: {sBuffer.Count}"); _logger.LogInformation($"Is the end : {received.EndOfMessage}"); fsInputQueue.Enqueue(sBuffer); if (received.CloseStatus.HasValue) diff --git a/src/Yavsc/ViewModels/Streaming/LiveCastHandler.cs b/src/Yavsc/ViewModels/Streaming/LiveCastHandler.cs index cffaf87b..610f6064 100644 --- a/src/Yavsc/ViewModels/Streaming/LiveCastHandler.cs +++ b/src/Yavsc/ViewModels/Streaming/LiveCastHandler.cs @@ -64,10 +64,9 @@ namespace Yavsc.ViewModels.Streaming logger.LogInformation($"writing {buffer.Array.Length} bytes..."); - await dest.WriteAsync(buffer.Array, 0, buffer.Array.Length); + await dest.WriteAsync(buffer.Array, buffer.Offset, buffer.Count); logger.LogInformation($"done."); - usage += buffer.Array.Length; - + usage += buffer.Count; } if (usage >= user.DiskQuota) break; if (queue.Count==0 && !isEndOfInput()) {