summaryrefslogtreecommitdiffstats
path: root/audio/decode/ad_spdif.c
diff options
context:
space:
mode:
authorAlex Mitzsch <43502191+mitzsch@users.noreply.github.com>2024-01-23 13:23:42 +0100
committersfan5 <sfan5@live.de>2024-01-24 21:21:01 +0100
commit68f1057d2ef3c24bf2d0dcd37d877e21e2879a65 (patch)
tree022a96be6a218ccc134a733226b507d9a3ea47ed /audio/decode/ad_spdif.c
parent7f595aabf45fd60d080ab80ccdc8def26cfbd2ec (diff)
downloadmpv-68f1057d2ef3c24bf2d0dcd37d877e21e2879a65.tar.bz2
mpv-68f1057d2ef3c24bf2d0dcd37d877e21e2879a65.tar.xz
ad_spdif: fix DTS 44.1khz passthrough playback
Fix DTS passthrough playback of 44.1 khz content. Also, take into account that there are some DTS variants with a samplerate of 96khz (e.g. DTS 24/96), somehow they are recognized wrongly as 48khz by the code. DonĀ“t rely on this "bug", do it correctly. Now every samplerate above 44.1Khz is correctly treated as 48khz, and 44.1khz files are treated as 44.1khz for bitstreaming.
Diffstat (limited to 'audio/decode/ad_spdif.c')
-rw-r--r--audio/decode/ad_spdif.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/audio/decode/ad_spdif.c b/audio/decode/ad_spdif.c
index 393af8a2a3..bb110cbed4 100644
--- a/audio/decode/ad_spdif.c
+++ b/audio/decode/ad_spdif.c
@@ -226,7 +226,7 @@ static int init_filter(struct mp_filter *da)
num_channels = dts_hd_spdif_channel_count;
} else {
sample_format = AF_FORMAT_S_DTS;
- samplerate = 48000;
+ samplerate = c_rate > 44100 ? 48000 : 44100;
num_channels = 2;
}
break;