From fd198a9cb1f033773102f54603bd06b98f3c7fb1 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 19 May 2024 23:27:34 +0200 Subject: Add and use Content::has_mapped_audio(). --- src/lib/player.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib/player.cc') diff --git a/src/lib/player.cc b/src/lib/player.cc index 27c89a2fa..47067af5a 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -251,7 +251,7 @@ have_video (shared_ptr content) bool have_audio (shared_ptr content) { - return static_cast(content->audio) && !content->audio->mapping().mapped_output_channels().empty() && content->can_be_played(); + return content->has_mapped_audio() && content->can_be_played(); } -- cgit v1.2.3 From 0bc6d354b100c44834302c6ac5d0b5099e0f0564 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 19 May 2024 23:46:55 +0200 Subject: Don't make _stream_states for unmapped audio, otherwise we wait for content which will never arrive. --- src/lib/player.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib/player.cc') diff --git a/src/lib/player.cc b/src/lib/player.cc index 47067af5a..75f6b7919 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -369,7 +369,7 @@ Player::setup_pieces () _stream_states.clear (); for (auto i: _pieces) { - if (i->content->audio) { + if (i->content->has_mapped_audio()) { for (auto j: i->content->audio->streams()) { _stream_states[j] = StreamState(i); } -- cgit v1.2.3