From 06283e07140f39a9f3db636c8a4ff8fcbc56a290 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Thu, 10 Aug 2023 22:24:47 +1000 Subject: Fix issues with timing stereo streams --- src/codecs/opus.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/codecs/opus.cpp') diff --git a/src/codecs/opus.cpp b/src/codecs/opus.cpp index f5ff471a..e6e3a1af 100644 --- a/src/codecs/opus.cpp +++ b/src/codecs/opus.cpp @@ -125,15 +125,7 @@ auto XiphOpusDecoder::OpenStream(std::shared_ptr input) auto l = op_pcm_total(opus_, -1); std::optional length; if (l > 0) { - // Output is always downmixed to two channels, but the pcm count does not - // reflect this. - int channels = op_channel_count(opus_, -1); - if (channels == 1) { - l *= 2; - } else if (channels > 2) { - l /= channels * 2; - } - length = l; + length = l * 2; } return OutputFormat{ -- cgit v1.2.3