Fix thinko in 4ce4b8d3429a97eb4df63460c7e73863f44a621e
authorCarl Hetherington <cth@carlh.net>
Fri, 21 May 2021 07:44:51 +0000 (09:44 +0200)
committerCarl Hetherington <cth@carlh.net>
Fri, 21 May 2021 07:44:51 +0000 (09:44 +0200)
Audio content of course doesn't have a single selected stream, so
let's get the channel count from how all the streams are mapped.

src/lib/audio_analyser.cc

index 64d200c76c19f134e2a5e2f02169b7f283c1500a..d5095c7e67038fd1c95713709c1f41730cf83e9e 100644 (file)
@@ -89,8 +89,8 @@ AudioAnalyser::AudioAnalyser (shared_ptr<const Film> film, shared_ptr<const Play
 
        int leqm_channels = film->audio_channels();
        auto content = _playlist->content();
-       if (content.size() == 1 && content[0]->audio && content[0]->audio->stream()) {
-               leqm_channels = content[0]->audio->stream()->channels();
+       if (content.size() == 1 && content[0]->audio) {
+               leqm_channels = content[0]->audio->mapping().mapped_output_channels().size();
        }
 
        /* XXX: is this right?  Especially for more than 5.1? */