summarylogtreecommitdiffstats
path: root/fix_channels.patch
blob: fb9ecf5e323b8844881c99f9c573eb7388eb3b79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/spek-audio.cc b/src/spek-audio.cc
index 3acabe6..5bb18b6 100644
--- a/src/spek-audio.cc
+++ b/src/spek-audio.cc
@@ -142,7 +142,7 @@ std::unique_ptr<AudioFile> Audio::open(const std::string& file_name, int stream)
         if (bits_per_sample) {
             bit_rate = 0;
         }
-        channels = codecpar->channels;
+        channels = codecpar->ch_layout.nb_channels;
 
         if (avstream->duration != AV_NOPTS_VALUE) {
             duration = avstream->duration * av_q2d(avstream->time_base);