diff options
author | dec05eba <dec05eba@protonmail.com> | 2025-05-27 08:14:00 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2025-05-27 08:14:00 +0200 |
commit | b2487788c2f9c0e73ebf6271bab6598be44e7cbb (patch) | |
tree | 8f008a73d0140222a5260fb43799e329fcb48490 | |
parent | 9485df761fc454fd4897d8ed1c2667300cace693 (diff) |
-rw-r--r-- | src/main.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index 6e59364..698c230 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -261,8 +261,13 @@ static AVCodecContext* create_audio_codec_context(int fps, gsr_audio_codec audio codec_context->sample_fmt = audio_codec_get_sample_format(codec_context, audio_codec, codec, mix_audio); codec_context->bit_rate = audio_bitrate == 0 ? audio_codec_get_get_bitrate(audio_codec) : audio_bitrate; codec_context->sample_rate = AUDIO_SAMPLE_RATE; - if(audio_codec == GSR_AUDIO_CODEC_AAC) + if(audio_codec == GSR_AUDIO_CODEC_AAC) { +#if LIBAVCODEC_VERSION_MAJOR < 62 codec_context->profile = FF_PROFILE_AAC_LOW; +#else + codec_context->profile = AV_PROFILE_AAC_LOW; +#endif + } #if LIBAVCODEC_VERSION_MAJOR < 60 codec_context->channel_layout = AV_CH_LAYOUT_STEREO; codec_context->channels = 2; |