MediaPortal/MediaPortal-1 — pull request #4 by jblomb (2012-01-29 11:12:20+00:00)
Title: Fix for wrong language selected if MPEG audio is not available, but AC3 is available.

If PreferAC3 is false and no MPEG audio streams are available, TVPlugin switch to the first AC3 stream regardless of language preferences.
Before the patch MP checks the audio streams in the following order if PreferAC3 is false:

1. select MPEG stream based on language pref
2. if not found then select MPEG stream index 0.
3. if no MPEG stream is found then select audio stream index 0.

With the patch MP checks the streams in the following order if PreferAC3 is false:

1. select MPEG stream based on language pref
2. if not found then select MPEG stream index 0.
3. if no MPEG stream is found then select AC3 stream based on language pref
4. If not found then select audio stream index 0.