ad_spdif: if DTS-HD is requested, and profile unknown, use DTS-HD

This means there will be no loss if profile detection failed for some
reason.
This commit is contained in:
wm4 2016-01-20 17:18:28 +01:00
parent ac966ded11
commit ca00e347fc
1 changed files with 2 additions and 1 deletions

View File

@ -191,7 +191,8 @@ static int init_filter(struct dec_audio *da, AVPacket *pkt)
break;
case AV_CODEC_ID_DTS: {
bool is_hd = profile == FF_PROFILE_DTS_HD_HRA ||
profile == FF_PROFILE_DTS_HD_MA;
profile == FF_PROFILE_DTS_HD_MA ||
profile == FF_PROFILE_UNKNOWN;
if (spdif_ctx->use_dts_hd && is_hd) {
av_dict_set(&format_opts, "dtshd_rate", "768000", 0); // 4*192000
sample_format = AF_FORMAT_S_DTSHD;