Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions code/src/iamf_dec/IAMF_decoder.c
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -673,8 +673,9 @@ static int iamf_codec_conf_get_sampling_rate(IAMF_CodecConf *c) {
if (c->decoder_conf_size < 6) return IAMF_ERR_BAD_ARG;
return reads32be(c->decoder_conf, 2);
} else if (cid == IAMF_CODEC_OPUS) {
if (c->decoder_conf_size < 8) return IAMF_ERR_BAD_ARG;
return reads32be(c->decoder_conf, 4);
// https://aomediacodec.github.io/iamf/v1.1.0.html#opus-specific
// The sample rate used for computing offsets SHALL be 48 kHz.
return 48000;
} else if (cid == IAMF_CODEC_AAC) {
BitStream b;
int ret, type;
Expand Down
2 changes: 1 addition & 1 deletion code/src/iamf_dec/opus/IAMF_opus_decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ static int iamf_opus_init(IAMF_CodecContext *ths) {
return IAMF_ERR_BAD_ARG;
}

ths->sample_rate = readu32be(config, 4);
ths->sample_rate = 48000; // readu32be(config, 4);
ths->channel_mapping_family = config[10];

ctx->dec = opus_multistream2_decoder_create(ths->sample_rate, ths->streams,
Expand Down