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.
This commit is contained in:
Alex Mitzsch 2024-01-23 13:23:42 +01:00 committed by sfan5
parent 7f595aabf4
commit 68f1057d2e
1 changed files with 1 additions and 1 deletions

View File

@ -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;