winlin

fix srs-librtmp send raw aac audio channel bug. 2.0.76

@@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 // current release version 31 // current release version
32 #define VERSION_MAJOR 2 32 #define VERSION_MAJOR 2
33 #define VERSION_MINOR 0 33 #define VERSION_MINOR 0
34 -#define VERSION_REVISION 75 34 +#define VERSION_REVISION 76
35 // server info. 35 // server info.
36 #define RTMP_SIG_SRS_KEY "SRS" 36 #define RTMP_SIG_SRS_KEY "SRS"
37 #define RTMP_SIG_SRS_ROLE "origin/edge server" 37 #define RTMP_SIG_SRS_ROLE "origin/edge server"
@@ -925,7 +925,7 @@ int __srs_write_aac_adts_frame(Context* context, @@ -925,7 +925,7 @@ int __srs_write_aac_adts_frame(Context* context,
925 // 7bits left. 925 // 7bits left.
926 926
927 // channelConfiguration; 4 bslbf 927 // channelConfiguration; 4 bslbf
928 - ch |= (aac_channel << 3) & 0x70; 928 + ch |= (aac_channel << 3) & 0x78;
929 // 3bits left. 929 // 3bits left.
930 930
931 // only support aac profile 1-4. 931 // only support aac profile 1-4.
@@ -939,11 +939,11 @@ int __srs_write_aac_adts_frame(Context* context, @@ -939,11 +939,11 @@ int __srs_write_aac_adts_frame(Context* context,
939 // extensionFlag; 1 bslbf 939 // extensionFlag; 1 bslbf
940 context->aac_specific_config += ch; 940 context->aac_specific_config += ch;
941 941
  942 + char* sh = (char*)context->aac_specific_config.data();
  943 + int nb_sh = (int)context->aac_specific_config.length();
942 if ((ret = __srs_write_audio_raw_frame(context, 944 if ((ret = __srs_write_audio_raw_frame(context,
943 sound_format, sound_rate, sound_size, sound_type, 945 sound_format, sound_rate, sound_size, sound_type,
944 - 0, (char*)context->aac_specific_config.data(),  
945 - context->aac_specific_config.length(),  
946 - timestamp)) != ERROR_SUCCESS 946 + 0, sh, nb_sh, timestamp)) != ERROR_SUCCESS
947 ) { 947 ) {
948 return ret; 948 return ret;
949 } 949 }