From 780b61eab5bd0ffb08410b2e9d5830a4b3f42984 Mon Sep 17 00:00:00 2001 From: Hendrik Leppkes Date: Thu, 4 Aug 2022 07:34:29 +0200 Subject: [PATCH] Fix dca sample rate reference --- decoder/LAVAudio/parser/dts.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/decoder/LAVAudio/parser/dts.cpp b/decoder/LAVAudio/parser/dts.cpp index 5b5466a3c..b5c7beaa0 100644 --- a/decoder/LAVAudio/parser/dts.cpp +++ b/decoder/LAVAudio/parser/dts.cpp @@ -30,10 +30,10 @@ extern "C" #pragma warning(disable : 4305) #include "libavcodec/avcodec.h" #include "libavcodec/get_bits.h" +#include "libavcodec/dca_sample_rate_tab.h" #pragma warning(pop) extern int avpriv_dca_convert_bitstream(const uint8_t *src, int src_size, uint8_t *dst, int max_size); - extern __declspec(dllimport) const uint32_t avpriv_dca_sample_rates[16]; }; #include "dts.h" @@ -265,7 +265,7 @@ int parse_dts_header(DTSParserContext *pContext, DTSHeader *pHeader, uint8_t *pB pHeader->FrameSize = get_bits(gb, 14) + 1; /* Primary (core) Frame Size */ pHeader->ChannelLayout = get_bits(gb, 6); /* Channel configuration */ unsigned sample_index = get_bits(gb, 4); /* Sample frequency index */ - pHeader->SampleRate = avpriv_dca_sample_rates[sample_index]; + pHeader->SampleRate = ff_dca_sample_rates[sample_index]; skip_bits(gb, 5); /* Bitrate index */ skip_bits1(gb); /* Down mix */ skip_bits1(gb); /* Dynamic range */