Second attempt at fixing the problem where streaming parameters
couldn't be set because the encoder index would be bogus.

Now also tested ;-)