On 29-01-19 19:21, Alexandre Julliard wrote:
Sven Baars sven.wine@gmail.com writes:
for (i = 0; i < This->enumMediaDetails.cMediaTypes; i++) {
This->enumMediaFunction(This->basePin, i,&amt);
if (FAILED(CopyMediaType(&This->enumMediaDetails.pMediaTypes[i], &amt)))
This->enumMediaFunction(This->basePin, i, &amt);
hr = CopyMediaType(&This->enumMediaDetails.pMediaTypes[i], &amt);
FreeMediaType(&amt);
The extra copy doesn't seem necessary, you could fetch directly into the destination array.
That seems to work indeed. I will send a new patch. Thanks!