mirror of
git://slackware.nl/current.git
synced 2024-12-28 09:59:53 +01:00
29 lines
925 B
Diff
29 lines
925 B
Diff
|
--- ./src/AV/Output/AudioEncoder.cpp.orig 2024-08-08 14:14:12.891073468 -0500
|
||
|
+++ ./src/AV/Output/AudioEncoder.cpp 2024-08-08 14:15:56.952101391 -0500
|
||
|
@@ -69,11 +69,7 @@
|
||
|
}
|
||
|
|
||
|
unsigned int AudioEncoder::GetChannels() {
|
||
|
-#if LIBAVCODEC_VERSION_MAJOR < 61
|
||
|
- return GetCodecContext()->channels;
|
||
|
-#else
|
||
|
return GetCodecContext()->ch_layout.nb_channels;
|
||
|
-#endif
|
||
|
}
|
||
|
|
||
|
unsigned int AudioEncoder::GetSampleRate() {
|
||
|
@@ -110,13 +106,8 @@
|
||
|
}
|
||
|
|
||
|
codec_context->bit_rate = bit_rate;
|
||
|
-#if LIBAVCODEC_VERSION_MAJOR < 61
|
||
|
- codec_context->channels = channels;
|
||
|
- codec_context->channel_layout = (channels == 1)? AV_CH_LAYOUT_MONO : AV_CH_LAYOUT_STEREO;
|
||
|
-#else
|
||
|
codec_context->ch_layout.nb_channels = channels;
|
||
|
codec_context->ch_layout.u.mask = (channels == 1)? AV_CH_LAYOUT_MONO : AV_CH_LAYOUT_STEREO;
|
||
|
-#endif
|
||
|
codec_context->sample_rate = sample_rate;
|
||
|
codec_context->time_base.num = 1;
|
||
|
codec_context->time_base.den = sample_rate;
|