Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/LAVFilters.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'decoder')
-rw-r--r--decoder/LAVAudio/DTSDecoder.cpp1
-rw-r--r--decoder/LAVAudio/LAVAudio.cpp8
2 files changed, 8 insertions, 1 deletions
diff --git a/decoder/LAVAudio/DTSDecoder.cpp b/decoder/LAVAudio/DTSDecoder.cpp
index edb60cf8..3779642f 100644
--- a/decoder/LAVAudio/DTSDecoder.cpp
+++ b/decoder/LAVAudio/DTSDecoder.cpp
@@ -406,6 +406,7 @@ HRESULT CLAVAudio::DecodeDTS(const BYTE * pDataBuffer, int buffsize, int &consum
// TODO: get rid of these
m_pAVCtx->sample_rate = HDSampleRate;
m_pAVCtx->profile = profile;
+ m_pAVCtx->bits_per_raw_sample = bitdepth;
// Send current input time to the delivery function
out.rtStart = m_rtStartInputCache;
diff --git a/decoder/LAVAudio/LAVAudio.cpp b/decoder/LAVAudio/LAVAudio.cpp
index f251697a..89178f65 100644
--- a/decoder/LAVAudio/LAVAudio.cpp
+++ b/decoder/LAVAudio/LAVAudio.cpp
@@ -955,7 +955,13 @@ HRESULT CLAVAudio::GetMediaType(int iPosition, CMediaType *pMediaType)
// Prefer bits_per_raw_sample if set, but if not, try to do a better guess with bits per coded sample
int bits = m_pAVCtx->bits_per_raw_sample ? m_pAVCtx->bits_per_raw_sample : m_pAVCtx->bits_per_coded_sample;
- LAVAudioSampleFormat lav_sample_fmt = m_pDTSDecoderContext ? SampleFormat_24 : get_lav_sample_fmt(sample_fmt, bits);
+
+ LAVAudioSampleFormat lav_sample_fmt;
+ if (m_pDTSDecoderContext) {
+ bits = m_DTSBitDepth;
+ lav_sample_fmt = (m_DTSBitDepth == 24) ? SampleFormat_24 : SampleFormat_16;
+ } else
+ lav_sample_fmt = get_lav_sample_fmt(sample_fmt, bits);
if (m_settings.MixingEnabled) {
if (nChannels != av_get_channel_layout_nb_channels(m_settings.MixingLayout)