Hi Michael,
2008/7/8 Michael Karcher wine@mkarcher.dialup.fu-berlin.de:
Am Montag, den 07.07.2008, 18:22 -0700 schrieb Maarten Lankhorst:
Reworks the code so that the lock is taking in the called procedures now.
- InputPin *pin = (InputPin *)pTransformFilter->ppPins[0];
- EnterCriticalSection(&pTransformFilter->csFilter);
- if (pTransformFilter->state == State_Stopped)
- {
LeaveCriticalSection(&pTransformFilter->csFilter);
return VFW_E_WRONG_STATE;
- }
I have to admit that I don't know anything about quartz. Are you sure you may access pTransformFilter->ppPins[0] before taking the lock?
It's safe, pins are allocated during construction, and the pointers themselves are not modified since. Doing operations on the pin requires the lock though.
Cheers, Maarten.