I have a DirectShow filter written Delphi 6 using the DSPACK component library. Currently I lock the filter state using the sync obj created for that purpose at the top of the FillBuffer() call and release it at the end (inside the finally section of a try/finally construct). Since the FillBuffer() call can block while waiting for new data to send out, via a WaitForSingleObject() call that is released by the thread that fulfills the data generation task, is this a bad idea? I am concerned that if the FillBuffer() call blocks for a (relatively) long time, this could affect negatively my filter or the entire filter graph.