diff --git a/trunk/auto/depends.sh b/trunk/auto/depends.sh index c29c908c0..edcba041a 100755 --- a/trunk/auto/depends.sh +++ b/trunk/auto/depends.sh @@ -709,6 +709,10 @@ if [[ $SRS_FFMPEG_FIT == YES ]]; then if [[ $SRS_CROSS_BUILD_CPU != "" ]]; then FFMPEG_OPTIONS="$FFMPEG_OPTIONS --cpu=$SRS_CROSS_BUILD_CPU"; fi FFMPEG_OPTIONS="$FFMPEG_OPTIONS --cross-prefix=$SRS_CROSS_BUILD_PREFIX" FFMPEG_OPTIONS="$FFMPEG_OPTIONS --cc=${SRS_TOOL_CC} --cxx=${SRS_TOOL_CXX} --ar=${SRS_TOOL_AR} --ld=${SRS_TOOL_LD}" + fi + # For cross-build. + if [[ $SRS_CROSS_BUILD == YES ]]; then + # Note that the audio might be corrupted, if use FFmpeg native opus. FFMPEG_OPTIONS="$FFMPEG_OPTIONS --enable-decoder=opus --enable-encoder=opus" else FFMPEG_OPTIONS="$FFMPEG_OPTIONS --enable-decoder=libopus --enable-encoder=libopus --enable-libopus" diff --git a/trunk/src/app/srs_app_rtc_codec.cpp b/trunk/src/app/srs_app_rtc_codec.cpp index 2b504fc2a..9a8b2575c 100644 --- a/trunk/src/app/srs_app_rtc_codec.cpp +++ b/trunk/src/app/srs_app_rtc_codec.cpp @@ -17,6 +17,7 @@ static const AVCodec* srs_find_decoder_by_id(SrsAudioCodecId id) } else if (id == SrsAudioCodecIdOpus) { const AVCodec* codec = avcodec_find_decoder_by_name("libopus"); if (!codec) { + // TODO: FIXME: Note that the audio might be corrupted, if use FFmpeg native opus. codec = avcodec_find_decoder_by_name("opus"); } return codec; @@ -31,6 +32,7 @@ static const AVCodec* srs_find_encoder_by_id(SrsAudioCodecId id) } else if (id == SrsAudioCodecIdOpus) { const AVCodec* codec = avcodec_find_encoder_by_name("libopus"); if (!codec) { + // TODO: FIXME: Note that the audio might be corrupted, if use FFmpeg native opus. codec = avcodec_find_encoder_by_name("opus"); } return codec;