Bump ffmpeg to 5.1.2 "Riemann"
[dcpomatic.git] / src / lib / ffmpeg_decoder.cc
index 85f79b513664f28f01640662b998d541ffcdde4a..29f661fc01f56f6f21cadda982a2baee96183523 100644 (file)
@@ -260,7 +260,7 @@ deinterleave_audio(shared_ptr<FFmpegAudioStream> stream, AVFrame* frame)
 
        /* XXX: can't we use swr_convert() to do the format conversion? */
 
-       int const channels = frame->channels;
+       int const channels = frame->ch_layout.nb_channels;
        int const frames = frame->nb_samples;
        int const total_samples = frames * channels;
        auto audio = make_shared<AudioBuffers>(channels, frames);