summaryrefslogtreecommitdiff
path: root/src/lib/player.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-05-17 15:02:57 +0200
committerCarl Hetherington <cth@carlh.net>2024-05-17 15:02:57 +0200
commitafd18ea6b14373b2078b6d6dbc74c836e6843757 (patch)
tree199edfd0ec9aa4353f64b0f7313ec8f7cf70a7b4 /src/lib/player.cc
parent7a9cadc6fe86c74035dd971685b1acdc8f32d3fc (diff)
Make sure we don't say some content has audio if none will be emitted.
In the FFmpeg (and shortly DCP) case we don't emit any audio if none is mapped, so we must take this into account in the player.
Diffstat (limited to 'src/lib/player.cc')
-rw-r--r--src/lib/player.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc
index 91a51c67f..27c89a2fa 100644
--- a/src/lib/player.cc
+++ b/src/lib/player.cc
@@ -251,7 +251,7 @@ have_video (shared_ptr<const Content> content)
bool
have_audio (shared_ptr<const Content> content)
{
- return static_cast<bool>(content->audio) && content->can_be_played();
+ return static_cast<bool>(content->audio) && !content->audio->mapping().mapped_output_channels().empty() && content->can_be_played();
}