]> git.alsa-project.org Git - alsa-plugins.git/commitdiff
a52: don't call avcodec_register_all() on newer libavocdec versions
authorJames Almer <jamrial@gmail.com>
Tue, 8 Jun 2021 20:08:41 +0000 (17:08 -0300)
committerJaroslav Kysela <perex@perex.cz>
Wed, 16 Jun 2021 06:53:41 +0000 (08:53 +0200)
It's no longer available starting with LIBAVCODEC_VERSION_MAJOR == 59.

BugLink: https://github.com/alsa-project/alsa-plugins/pull/23
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
a52/pcm_a52.c

index 816e5e31af6248a7aeecbaff0ddb2732adbf3a83..14e444d2cbea763a784a42a2f2793032b1055ab5 100644 (file)
@@ -1004,7 +1004,9 @@ SND_PCM_PLUGIN_DEFINE_FUNC(a52)
 #ifndef USE_AVCODEC_FRAME
        avcodec_init();
 #endif
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(59, 0, 0)
        avcodec_register_all();
+#endif
 
        rec->codec = avcodec_find_encoder_by_name("ac3_fixed");
        if (rec->codec == NULL)