Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arguments called in wrong order #1247

Closed
mattark opened this issue Sep 25, 2020 · 2 comments
Closed

Arguments called in wrong order #1247

mattark opened this issue Sep 25, 2020 · 2 comments
Labels

Comments

@mattark
Copy link

mattark commented Sep 25, 2020

Which sample are you reporting a bug in?

SimpleCommunications

Describe the bug

Problem with line of code in CaptureDevice,cs.

CaptureDevice.StartRecordingAsync calls a StspMediaSinkProxy method 'InitializeAsync' with parameters in the wrong order.

As presented, line is: var mfExtension = await mediaSink.InitializeAsync(encodingProfile.Audio, encodingProfile.Video);
Should be: var mfExtension = await mediaSink.InitializeAsync(encodingProfile.Video, encodingProfile.Audio);

To Reproduce

Code actually works as presented, but I think it takes longer to Initialize.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Configuration

  • Language/architecture/flavor: (example: C++/WinRT x64 Debug)
  • Windows platform and build number: (example: Desktop build 18362.)
  • Visual Studio version: (example: 16.6.5; get this value from Help.About.)

Additional context
Add any other context about the problem here.

@mattark mattark added the bug label Sep 25, 2020
@oldnewthing
Copy link
Member

This is just a typo in the header file. The implementation and callers all use Video/Audio. But the prototype in the header has them swapped. The code is actually correct, which is why it works as presented. I'll fix the header.

oldnewthing added a commit that referenced this issue Mar 10, 2022
* IoT-GPIO: Remember event token so we can unsubscribe later #1247
* SimpleCommunication: Fix typo in parameter ordering (code worked, but names were backward) #1294
* WiFiDirect: Fix build #1319
* Delete obsolete samples templates
@oldnewthing
Copy link
Member

Fixed in v10.0.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants