From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Wed, 8 Jun 2022 16:52:13 +0000 (-0700) Subject: Less hacky check for the need to use avcodec_register_all X-Git-Tag: 4.1-rc1~24^2~145 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e1228c4fa9bb24dd395d8357216ac482c413558b;p=thirdparty%2Fshairport-sync.git Less hacky check for the need to use avcodec_register_all --- diff --git a/shairport.c b/shairport.c index f7b5ed45..3e2c1587 100644 --- a/shairport.c +++ b/shairport.c @@ -1701,13 +1701,12 @@ int main(int argc, char **argv) { } #ifdef CONFIG_AIRPLAY_2 -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" - // this is needed by FFMPEG 3 or earlier - // it needs to be done now in case -h is selected -- to check whether the fltp AAC - // decoder is present or not +#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(53, 10, 0) + avcodec_init(); +#endif +#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 9, 100) avcodec_register_all(); -#pragma GCC diagnostic pop +#endif #endif /* Check if we are called with -h or --help parameter */