xbmc/xbmc — pull request #2562 by ace20022 (2013-04-07 21:28:39+00:00)
Title: [Feature/RFC] Support external audio tracks with dvdplayer

This PR adds the possibility to play external audio tracks together with video files.
The original PR is here:#1337. Currently there is no support for language/type extraction from the filename. It can easily be added after #1365 got merged, the code for that is in my repo.

I implemented it with minimal code changes/additions in mind. The idea is to drop/ignore audio packets from internal tracks if an external track is selected. The read rate is hard-coded at the moment, maybe someone has a solution for that flaw. I'm not sure if this leads to performance issues on low power devices.
There are at least 2 shortcomings at the moment:
* playback stops if the selected external track reaches its end (before the end of the video stream)
* seeking may lead to temporary stutter

Two other approaches that came to my mind are
* allow more than one player at a time and mix or prioritize the streams
* handle/decode video and audio frames separately, i.e., extend this idea: #1137

BTW this was my first contact with c++ and xbmc-code, so it's certainly far from perfect.