Emit no audio from DCPs if none is mapped v2.16.85
authorCarl Hetherington <cth@carlh.net>
Fri, 17 May 2024 13:03:15 +0000 (15:03 +0200)
committerCarl Hetherington <cth@carlh.net>
Fri, 17 May 2024 13:03:15 +0000 (15:03 +0200)
This makes DCP content behave the same as FFmpeg.

src/lib/dcp_decoder.cc

index 165b5bfb55a2b3ee70521f55fd3a15815722cc65..17f0e73b5d1ccf58e9349cb608c6fe7571b954a2 100644 (file)
@@ -77,7 +77,7 @@ DCPDecoder::DCPDecoder (shared_ptr<const Film> film, shared_ptr<const DCPContent
                if (content->video) {
                        video = make_shared<VideoDecoder>(this, content);
                }
-               if (content->audio) {
+               if (content->audio && !content->audio->mapping().mapped_output_channels().empty()) {
                        audio = make_shared<AudioDecoder>(this, content->audio, fast);
                }
                for (auto i: content->text) {