From 03c5f76e64584b87be772542b90306e83e94b382 Mon Sep 17 00:00:00 2001 From: Haibo Chen Date: Thu, 1 Jul 2021 06:22:16 +0800 Subject: [PATCH 1/2] update channel_layout by channels, for ffmpeg transcode opus to aac success (#2452) --- trunk/src/app/srs_app_rtc_codec.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/trunk/src/app/srs_app_rtc_codec.cpp b/trunk/src/app/srs_app_rtc_codec.cpp index d38560846..f04757f85 100644 --- a/trunk/src/app/srs_app_rtc_codec.cpp +++ b/trunk/src/app/srs_app_rtc_codec.cpp @@ -147,6 +147,8 @@ srs_error_t SrsAudioTranscoder::init_dec(SrsAudioCodecId src_codec) if (avcodec_open2(dec_, codec, NULL) < 0) { return srs_error_new(ERROR_RTC_RTP_MUXER, "Could not open codec"); } + + dec_->channel_layout = av_get_default_channel_layout(dec_->channels); dec_frame_ = av_frame_alloc(); if (!dec_frame_) { From e802fe5bd61392494aaf6fa35b6205f0adbd1938 Mon Sep 17 00:00:00 2001 From: winlin Date: Thu, 1 Jul 2021 06:25:36 +0800 Subject: [PATCH 2/2] Release 4.0.138 --- CHANGELOG.md | 1 + trunk/src/core/srs_core_version4.hpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4113af929..b13686492 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ The changelog for SRS. ## SRS 4.0 Changelog +* v4.0, 2021-07-01, Merge [#2452](https://github.com/ossrs/srs/pull/2452), fix FFmpeg bug by updating channel_layout. 4.0.138 * v4.0, 2021-06-30, Merge [#2440](https://github.com/ossrs/srs/pull/2440), fix [#2390](https://github.com/ossrs/srs/issues/2390), SRT bug for zerolatency. 4.0.137 * v4.0, 2021-06-28, Merge [#2435](https://github.com/ossrs/srs/pull/2435), fix bug for HTTP-RAW-API to check vhost. 4.0.136 * v4.0, 2021-06-28, Fix [#2431](https://github.com/ossrs/srs/issues/2431), configure FFmpeg bug. 4.0.135 diff --git a/trunk/src/core/srs_core_version4.hpp b/trunk/src/core/srs_core_version4.hpp index df8223768..c30d735f1 100644 --- a/trunk/src/core/srs_core_version4.hpp +++ b/trunk/src/core/srs_core_version4.hpp @@ -9,6 +9,6 @@ #define VERSION_MAJOR 4 #define VERSION_MINOR 0 -#define VERSION_REVISION 137 +#define VERSION_REVISION 138 #endif