This commit is contained in:
Malte Rosenbjerg 2025-10-17 10:33:29 +02:00
parent f919a05d43
commit 2852692250
2 changed files with 4 additions and 4 deletions

View file

@ -30,21 +30,21 @@ public class FFMpegDownloader
// download ffmpeg if selected
if (binaries.HasFlag(FFMpegBinaries.FFMpeg) && downloadInfo.FFMpeg is not null)
{
await using var zipStream = await FFbinariesService.DownloadFileAsSteam(new Uri(downloadInfo.FFMpeg));
await using var zipStream = await FFbinariesService.DownloadFileAsStream(new Uri(downloadInfo.FFMpeg));
successList.AddRange(FFbinariesService.ExtractZipAndSave(zipStream));
}
// download ffprobe if selected
if (binaries.HasFlag(FFMpegBinaries.FFProbe) && downloadInfo.FFProbe is not null)
{
await using var zipStream = await FFbinariesService.DownloadFileAsSteam(new Uri(downloadInfo.FFProbe));
await using var zipStream = await FFbinariesService.DownloadFileAsStream(new Uri(downloadInfo.FFProbe));
successList.AddRange(FFbinariesService.ExtractZipAndSave(zipStream));
}
// download ffplay if selected
if (binaries.HasFlag(FFMpegBinaries.FFPlay) && downloadInfo.FFPlay is not null)
{
await using var zipStream = await FFbinariesService.DownloadFileAsSteam(new Uri(downloadInfo.FFPlay));
await using var zipStream = await FFbinariesService.DownloadFileAsStream(new Uri(downloadInfo.FFPlay));
successList.AddRange(FFbinariesService.ExtractZipAndSave(zipStream));
}

View file

@ -42,7 +42,7 @@ internal class FFbinariesService
/// </summary>
/// <param name="address">uri of the file</param>
/// <returns></returns>
internal static async Task<Stream> DownloadFileAsSteam(Uri address)
internal static async Task<Stream> DownloadFileAsStream(Uri address)
{
var client = new HttpClient();
return await client.GetStreamAsync(address);