Question

Is FilterGraph supposed to be used once per file? If I render some file to FilterGraph and then try to load another one, it plays both of them. So should I recreate a FilterGraph for the second file or is there any way to unload a first file?

Was it helpful?

Solution

I suppose you are not checking what you are actually having in your graphs, otherwise there just cannot be questions like asked. There is no connection between files and filter graphs. Any filter graph might have zero to infinity files referenced by contained filters. File use/reuse/render to graph are inapplicable to filter graphs in first place.

What you are supposedly having is adding new filters to existing filter graph without removing earlier added. Checking graph topology would reveal this immediately. If your intent is to play another file, you should either enumerate and remove earlier added filters (this is the "unload" you are looking for) and then start adding new ones, or you just create a new filter graph from fresh. The latter makes more sense unless you have specific reasons to reuse certain filters.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top