if (extensions_mask & DCA_EXT_EXSS_XLL)
s->profile = FF_PROFILE_DTS_HD_MA;
- else if (extensions_mask & DCA_EXT_EXSS_XBR)
+ else if (extensions_mask & (DCA_EXT_EXSS_XBR | DCA_EXT_EXSS_X96 |
+ DCA_EXT_EXSS_XXCH))
s->profile = FF_PROFILE_DTS_HD_HRA;
- else if (extensions_mask & DCA_EXT_EXSS_X96)
- s->profile = FF_PROFILE_DTS_96_24;
- else if (extensions_mask & DCA_EXT_EXSS_XXCH)
- s->profile = FFMAX(s->profile, FF_PROFILE_DTS_ES);
if (!(extensions_mask & DCA_EXT_CORE))
av_log(s->avctx, AV_LOG_WARNING, "DTS core detection mismatch.\n");
set the channels based on a broken first frame.*/
if (s->is_channels_set == 0) {
s->is_channels_set = 1;
- avctx->channels = channels;
+ avctx->channels = channels;
}
if (avctx->channels != channels) {
av_log(avctx, AV_LOG_ERROR, "DCA decoder does not support number of "
return 0;
}
-AVCodec dca_decoder = {
+static const AVProfile profiles[] = {
+ { FF_PROFILE_DTS, "DTS" },
+ { FF_PROFILE_DTS_ES, "DTS-ES" },
+ { FF_PROFILE_DTS_96_24, "DTS 96/24" },
+ { FF_PROFILE_DTS_HD_HRA, "DTS-HD HRA" },
+ { FF_PROFILE_DTS_HD_MA, "DTS-HD MA" },
+ { FF_PROFILE_UNKNOWN },
+};
+
+AVCodec ff_dca_decoder = {
.name = "dca",
.type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_DTS,
.close = dca_decode_end,
.long_name = NULL_IF_CONFIG_SMALL("DCA (DTS Coherent Acoustics)"),
.capabilities = CODEC_CAP_CHANNEL_CONF,
+ .profiles = NULL_IF_CONFIG_SMALL(profiles),
};