Recursive cancellation for MFAudioService.Play

This commit is contained in:
Yoshi Askharoun
2022-06-11 20:40:59 -05:00
parent 72f1b42fd4
commit 2270c0abe7
@@ -94,7 +94,10 @@ namespace Microsoft.Zune.Playback
else if (sourceConfig.MediaConfig.MediaSourceUri.Scheme.StartsWith("http"))
{
System.Net.Http.HttpClient client = new();
stream = await client.GetStreamAsync(sourceConfig.MediaConfig.MediaSourceUri);
stream = await client.GetStreamAsync(sourceConfig.MediaConfig.MediaSourceUri, cancellationToken);
cancellationToken.ThrowIfCancellationRequested();
reader = new StreamMediaFoundationReader(stream);
}