sharpdx / SharpDX

SharpDX GitHub Repository
http://sharpdx.org
MIT License
1.69k stars 641 forks source link

[MediaFoundation] SinkWriter.GetStatistics fix #1005

Closed battlebottle closed 6 years ago

battlebottle commented 6 years ago

A fix for SinkWriter.GetStatistics. It's broken at the moment as the cb field of SinkWriterStatistics needs to be set to the size of the struct in bytes before passing it to the method. This is described in the documentation:

https://msdn.microsoft.com/en-us/library/windows/desktop/dd374650(v=vs.85).aspx

I'm not sure if my code represents best practice, so let me know if there's a better way to fix this than what I've done and I'll resubmit it.

xoofx commented 6 years ago

Thanks