Fix transcoding runtime errors

This fixes runtime errors when:

* the "iPad" profile is selected;
* the source file contains multiple output streams.