overload OpenDemuxStream with one that takes the inputstream to be opened as a parameter. Ie so you have:

````
bool OpenDemuxStream()
{
    foreach(inputstream)
        OpenDemuxStream(inputstream)
}