From 12f4abd55381b0f0bf26a7f8ec60e7d1603316fb Mon Sep 17 00:00:00 2001 From: winlin Date: Mon, 29 Dec 2014 14:24:22 +0800 Subject: [PATCH] fix #266, aac profile is object id plus one. 2.0.80 --- README.md | 1 + trunk/src/core/srs_core.hpp | 2 +- trunk/src/libs/srs_librtmp.cpp | 7 ++++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 44e004c4a..265ca3f2e 100755 --- a/README.md +++ b/README.md @@ -501,6 +501,7 @@ Supported operating systems and hardware: * 2013-10-17, Created.
## History +* v2.0, 2014-12-12, fix [#266](https://github.com/winlinvip/simple-rtmp-server/issues/266), aac profile is object id plus one. 2.0.80 * v2.0, 2014-12-29, hotfix [#267](https://github.com/winlinvip/simple-rtmp-server/issues/267), the forward dest ep should use server. 2.0.79 * v2.0, 2014-12-29, hotfix [#268](https://github.com/winlinvip/simple-rtmp-server/issues/268), the hls pcr is negative when startup. 2.0.78 * v2.0, 2014-12-22, hotfix [#264](https://github.com/winlinvip/simple-rtmp-server/issues/264), ignore NALU when sequence header to make HLS happy. 2.0.76 diff --git a/trunk/src/core/srs_core.hpp b/trunk/src/core/srs_core.hpp index 3a9374fd9..bf65fd5fd 100644 --- a/trunk/src/core/srs_core.hpp +++ b/trunk/src/core/srs_core.hpp @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // current release version #define VERSION_MAJOR 2 #define VERSION_MINOR 0 -#define VERSION_REVISION 79 +#define VERSION_REVISION 80 // server info. #define RTMP_SIG_SRS_KEY "SRS" #define RTMP_SIG_SRS_ROLE "origin/edge server" diff --git a/trunk/src/libs/srs_librtmp.cpp b/trunk/src/libs/srs_librtmp.cpp index 54ddf07f5..8f7d2a93d 100644 --- a/trunk/src/libs/srs_librtmp.cpp +++ b/trunk/src/libs/srs_librtmp.cpp @@ -1065,10 +1065,15 @@ int __srs_write_aac_adts_frames(Context* context, return ERROR_AAC_ADTS_HEADER; } + // the profile = object_id + 1 + // @see aac-mp4a-format-ISO_IEC_14496-3+2001.pdf, page 78, + // Table 1. A.9 – MPEG-2 Audio profiles and MPEG-4 Audio object types + char aac_profile = fh_Profile_ObjectType + 1; + char* raw_data = stream->data() + stream->pos(); if ((ret = __srs_write_aac_adts_frame(context, sound_format, sound_rate, sound_size, sound_type, - fh_Profile_ObjectType, fh_sampling_frequency_index, fh_channel_configuration, + aac_profile, fh_sampling_frequency_index, fh_channel_configuration, raw_data, raw_data_size, timestamp)) != ERROR_SUCCESS ) { return ret;