aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2022-09-12 21:14:48 +0200
committerdec05eba <dec05eba@protonmail.com>2022-09-12 21:14:48 +0200
commit49c876ca0037f72165d97e60640af788847101bc (patch)
tree42f8bc3c19a25f99e3698a7f62a285992eadf765 /src/main.cpp
parent948d285f82ab9bf9006fface1ae065fcb4ff0729 (diff)
Make compatbie with old ass ubuntu
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp
index fbc8725..5f59bea 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -389,7 +389,7 @@ static AVCodecContext* create_audio_codec_context(AVFormatContext *av_format_con
//codec_context->bit_rate = 64000;
codec_context->sample_rate = 48000;
codec_context->profile = FF_PROFILE_AAC_LOW;
-#if LIBAVUTIL_VERSION_MAJOR < 54
+#if LIBAVCODEC_VERSION_MAJOR < 59
codec_context->channel_layout = AV_CH_LAYOUT_STEREO;
codec_context->channels = 2;
#else
@@ -520,7 +520,7 @@ static AVFrame* open_audio(AVCodecContext *audio_codec_context) {
frame->nb_samples = audio_codec_context->frame_size;
frame->format = audio_codec_context->sample_fmt;
-#if LIBAVUTIL_VERSION_MAJOR < 54
+#if LIBAVCODEC_VERSION_MAJOR < 59
frame->channels = audio_codec_context->channels;
frame->channel_layout = audio_codec_context->channel_layout;
#else
@@ -1201,7 +1201,7 @@ int main(int argc, char **argv) {
audio_tracks.push_back({ audio_codec_context, audio_frame, audio_stream, audio_input, {}, {}, audio_stream_index });
-#if LIBAVUTIL_VERSION_MAJOR < 54
+#if LIBAVCODEC_VERSION_MAJOR < 59
const int num_channels = audio_codec_context->channels;
#else
const int num_channels = audio_codec_context->ch_layout.nb_channels;