Bump ffmpeg to 5.1.2 "Riemann"
[dcpomatic.git] / src / lib / ffmpeg_decoder.cc
index 6e9d671a2fa87792e2ea5b58d6b2d9b2e136822c..a260a757b22a5b08aa81e2563162100f800bae33 100644 (file)
@@ -260,7 +260,7 @@ deinterleave_audio(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);