]> git.alsa-project.org Git - alsa-plugins.git/commitdiff
a52: switch to AV_CODEC_ID identifiers
authorAnton Khirnov <anton@khirnov.net>
Thu, 9 Jan 2014 20:14:17 +0000 (21:14 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 10 Jan 2014 09:12:02 +0000 (10:12 +0100)
Fixes build with latest libavcodec versions.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
a52/pcm_a52.c

index 359608fbafe31b4fccfddee097becc0a1b09add2..b467ec8e5abb40ae69d6572e4af4365e91e59843 100644 (file)
@@ -58,6 +58,9 @@
 #endif
 #endif
 
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 25, 0)
+#define AV_CODEC_ID_AC3 CODEC_ID_AC3
+#endif
 
 struct a52_ctx {
        snd_pcm_ioplug_t io;
@@ -916,7 +919,7 @@ SND_PCM_PLUGIN_DEFINE_FUNC(a52)
        if (rec->codec == NULL)
                rec->codec = avcodec_find_encoder_by_name("ac3");
        if (rec->codec == NULL) 
-               rec->codec = avcodec_find_encoder(CODEC_ID_AC3);
+               rec->codec = avcodec_find_encoder(AV_CODEC_ID_AC3);
        if (rec->codec == NULL) {
                SNDERR("Cannot find codec engine");
                err = -EINVAL;