This commit is contained in:
Malte Rosenbjerg 2020-12-07 01:20:13 +01:00
parent 7fd7ae369d
commit 203da6300b
4 changed files with 2 additions and 3 deletions

View file

@ -38,7 +38,7 @@ public void Audio_Save()
[TestMethod]
public async Task Audio_FromRaw()
{
await using var file = File.Open(VideoLibrary.LocalAudioRaw.FullName, FileMode.Open);
await using var file = File.Open(TestResources.RawAudio, FileMode.Open);
var memoryStream = new MemoryStream();
await FFMpegArguments
.FromPipeInput(new StreamPipeSource(file), options => options.ForceFormat("s16le"))

View file

@ -20,6 +20,7 @@ public static class TestResources
public static readonly string WebmVideo = "./Resources/input_3sec.webm";
public static readonly string Mp4WithoutVideo = "./Resources/input_audio_only_10sec.mp4";
public static readonly string Mp4WithoutAudio = "./Resources/input_video_only_3sec.mp4";
public static readonly string RawAudio = "./Resources/audio.raw";
public static readonly string Mp3Audio = "./Resources/audio.mp3";
public static readonly string PngImage = "./Resources/cover.png";
public static readonly string ImageCollection = "./Resources/images";

View file

@ -25,7 +25,6 @@ protected override async Task ProcessDataAsync(CancellationToken token)
if (!Pipe.IsConnected)
throw new TaskCanceledException();
await Writer.WriteAsync(Pipe, token).ConfigureAwait(false);
Pipe.Disconnect();
}
}
}

View file

@ -22,7 +22,6 @@ protected override async Task ProcessDataAsync(CancellationToken token)
if (!Pipe.IsConnected)
throw new TaskCanceledException();
await Reader.ReadAsync(Pipe, token).ConfigureAwait(false);
Pipe.Disconnect();
}
}
}