]> git.alsa-project.org Git - alsa-plugins.git/commitdiff
a52: Fix build with older ffmpeg versions.
authorColin Guthrie <colin@mageia.org>
Tue, 26 Apr 2011 21:55:44 +0000 (22:55 +0100)
committerTakashi Iwai <tiwai@suse.de>
Wed, 27 Apr 2011 08:21:03 +0000 (10:21 +0200)
This fixes a regression introduced in:
  40c129a160f37fe9488b2828d6299f99c269703e

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

index 76f21cd003bfcfb8c3b07e003f04aca6132a7b79..00c7c59f69a07fa013841c490197f09954308f90 100644 (file)
@@ -436,7 +436,11 @@ static int a52_prepare(snd_pcm_ioplug_t *io)
        rec->avctx->bit_rate = rec->bitrate * 1000;
        rec->avctx->sample_rate = io->rate;
        rec->avctx->channels = io->channels;
-       rec->avctx->sample_fmt = AV_SAMPLE_FMT_S16;
+#if LIBAVCODEC_VERSION_MAJOR > 52 || (LIBAVCODEC_VERSION_MAJOR == 52 && LIBAVCODEC_VERSION_MINOR >= 95)
+  rec->avctx->sample_fmt = AV_SAMPLE_FMT_S16;
+#else
+  rec->avctx->sample_fmt = SAMPLE_FMT_S16;
+#endif
 #if LIBAVCODEC_VERSION_MAJOR > 52 || (LIBAVCODEC_VERSION_MAJOR == 52 && LIBAVCODEC_VERSION_MINOR >= 3)
        switch (io->channels) {
        case 2: