dvdplayer: Fix m_streaminfo updates from passthrough codec
authorAnssi Hannula <anssi@xbmc.org>
Sat, 31 Aug 2013 12:49:12 +0000 (15:49 +0300)
committerAnssi Hannula <anssi@xbmc.org>
Sat, 31 Aug 2013 13:05:30 +0000 (16:05 +0300)
commitbcb4338272b550b45e159b34075d575c845b0ae0
tree9d5017c6585bc0f831cc372e1ec0b7ebd26d74c5
parent22a94e41d4544414fb8c9b9ead6b825eb806ff31
dvdplayer: Fix m_streaminfo updates from passthrough codec

Use the GetEncodedSampleRate() method instead of GetSampleRate() to
populate m_streaminfo, since the latter returns the passthrough frame
rate which is not relevant in the context of m_streaminfo.

Also, do not overwrite channel count and sample rate with zero after
opening a passthrough codec, instead keep the demuxer values. These are
only used internally for codec selection.

This fixes some unnecessary back-and-forth checking between regular
and passthrough codec when opening a stream due to wrongly detected
sample rate changes in certain situations.
xbmc/cores/dvdplayer/DVDPlayerAudio.cpp