opdenkamp/xbmc-pvr-addons — pull request #259 by Jalle19 (2014-01-04 10:46:34+00:00)
Title: Improve stream handling

Changes:

* don't clear the stream vector except when completely stopping playback (ie. when the demux is closed).
* only compare the stream codec when determining if a stream still exists or not

With these changes the streams don't get shuffled around during channel switches. I don't see the point in treating general stream changes (such as a new audio stream appearing suddenly) with stream changes that happen due to a channel switch. In many cases two different channels have the exact same type of streams (e.g. one MPEG-2 video and one MP2 audio stream).

Coupled with https://github.com/Jalle19/xbmc/compare/faster-channel-switching (which I'm currently testing locally, feel free to check it out) this means neither the demuxer nor the audio sink have to be reset when switching channels which considerable speeds up channel switching. With this PR it can be so fast that it's hard to measure accurately with a stopwatch (due to reaction time).

@opdenkamp and @FernetMenta I'd appreciate your input as usual.