From 27800ea9ebb972f16e9ed3de35f62ad472dc8ef4 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Sun, 12 Jun 2022 16:23:24 +0200 Subject: [PATCH] Bink: replace AVFrame.channel_layout with .channels Replace again with .ch_layout when ffmpeg finish changing their mind. --- src/bink.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bink.c b/src/bink.c index 2f54be0..bb0ec4a 100644 --- a/src/bink.c +++ b/src/bink.c @@ -180,12 +180,12 @@ static int DecodeAudioFrame(struct binkMovie* aMovie) return 0; if (!aMovie->alInited) { - switch (aMovie->audioFrame->channel_layout) { - case AV_CH_LAYOUT_MONO: + switch (aMovie->audioFrame->channels) { + case 1: aMovie->alFormat = (aMovie->audioFrame->format == AV_SAMPLE_FMT_U8) ? AL_FORMAT_MONO8 : AL_FORMAT_MONO16; break; - case AV_CH_LAYOUT_STEREO: + case 2: aMovie->alFormat = (aMovie->audioFrame->format == AV_SAMPLE_FMT_U8) ? AL_FORMAT_STEREO8 : AL_FORMAT_STEREO16; break;