diff options
-rw-r--r-- | xbmc/cores/paplayer/DVDPlayerCodec.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/xbmc/cores/paplayer/DVDPlayerCodec.cpp b/xbmc/cores/paplayer/DVDPlayerCodec.cpp index 4fa3bc0db6..a1f76c34cd 100644 --- a/xbmc/cores/paplayer/DVDPlayerCodec.cpp +++ b/xbmc/cores/paplayer/DVDPlayerCodec.cpp @@ -203,6 +203,10 @@ bool DVDPlayerCodec::Init(const CStdString &strFile, unsigned int filecache) m_TotalTime = m_pDemuxer->GetStreamLength(); m_Bitrate = m_pAudioCodec->GetBitRate(); + if (!m_Bitrate && m_TotalTime) + { + m_Bitrate = ((m_pInputStream->GetLength()*1000) / m_TotalTime) * 8; + } m_pDemuxer->GetStreamCodecName(m_nAudioStream,m_CodecName); m_strFileName = strFile; |