Search code examples
c++directshow

How to pass queued data to renderer in EndOfStream?


I've written a transform filter which don't pass sample to renderer for first four frames because i extract and store data in queue. since call to transform method is equal to number of frames that's why my last 3 frame data is not getting called and there is loss of data. how can solve this problem in EndOfStream.


Solution

  • You receive EndOfStream call and before passing it downstream you decide what to do with the data you are holding. You can discard it, or generate outgoing media samples - it is up to you. Once you are finished, you forward the EndOfStream call downstream.