File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -626,8 +626,9 @@ static int iamf_codec_conf_get_sampling_rate(IAMF_CodecConf *c) {
626626 if (c -> decoder_conf_size < 6 ) return IAMF_ERR_BAD_ARG ;
627627 return reads32be (c -> decoder_conf , 2 );
628628 } else if (cid == IAMF_CODEC_OPUS ) {
629- if (c -> decoder_conf_size < 8 ) return IAMF_ERR_BAD_ARG ;
630- return reads32be (c -> decoder_conf , 4 );
629+ // https://aomediacodec.github.io/iamf/v1.1.0.html#opus-specific
630+ // The sample rate used for computing offsets SHALL be 48 kHz.
631+ return 48000 ;
631632 } else if (cid == IAMF_CODEC_AAC ) {
632633 BitStream b ;
633634 int ret , type ;
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ static int iamf_opus_init(IAMF_CodecContext *ths) {
8080 return IAMF_ERR_BAD_ARG ;
8181 }
8282
83- ths -> sample_rate = readu32be (config , 4 );
83+ ths -> sample_rate = 48000 ; // readu32be(config, 4);
8484 ths -> channel_mapping_family = config [10 ];
8585
8686 ctx -> dec = opus_multistream2_decoder_create (ths -> sample_rate , ths -> streams ,
You can’t perform that action at this time.
0 commit comments