mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
fix srs-librtmp send raw aac audio channel bug. 2.0.76
This commit is contained in:
parent
9788570ba5
commit
92146712d8
2 changed files with 119 additions and 119 deletions
2
trunk/src/core/srs_core.hpp
Normal file → Executable file
2
trunk/src/core/srs_core.hpp
Normal file → Executable file
|
@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
// current release version
|
// current release version
|
||||||
#define VERSION_MAJOR 2
|
#define VERSION_MAJOR 2
|
||||||
#define VERSION_MINOR 0
|
#define VERSION_MINOR 0
|
||||||
#define VERSION_REVISION 75
|
#define VERSION_REVISION 76
|
||||||
// server info.
|
// server info.
|
||||||
#define RTMP_SIG_SRS_KEY "SRS"
|
#define RTMP_SIG_SRS_KEY "SRS"
|
||||||
#define RTMP_SIG_SRS_ROLE "origin/edge server"
|
#define RTMP_SIG_SRS_ROLE "origin/edge server"
|
||||||
|
|
|
@ -925,7 +925,7 @@ int __srs_write_aac_adts_frame(Context* context,
|
||||||
// 7bits left.
|
// 7bits left.
|
||||||
|
|
||||||
// channelConfiguration; 4 bslbf
|
// channelConfiguration; 4 bslbf
|
||||||
ch |= (aac_channel << 3) & 0x70;
|
ch |= (aac_channel << 3) & 0x78;
|
||||||
// 3bits left.
|
// 3bits left.
|
||||||
|
|
||||||
// only support aac profile 1-4.
|
// only support aac profile 1-4.
|
||||||
|
@ -939,11 +939,11 @@ int __srs_write_aac_adts_frame(Context* context,
|
||||||
// extensionFlag; 1 bslbf
|
// extensionFlag; 1 bslbf
|
||||||
context->aac_specific_config += ch;
|
context->aac_specific_config += ch;
|
||||||
|
|
||||||
|
char* sh = (char*)context->aac_specific_config.data();
|
||||||
|
int nb_sh = (int)context->aac_specific_config.length();
|
||||||
if ((ret = __srs_write_audio_raw_frame(context,
|
if ((ret = __srs_write_audio_raw_frame(context,
|
||||||
sound_format, sound_rate, sound_size, sound_type,
|
sound_format, sound_rate, sound_size, sound_type,
|
||||||
0, (char*)context->aac_specific_config.data(),
|
0, sh, nb_sh, timestamp)) != ERROR_SUCCESS
|
||||||
context->aac_specific_config.length(),
|
|
||||||
timestamp)) != ERROR_SUCCESS
|
|
||||||
) {
|
) {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue