Don't make _stream_states for unmapped audio, otherwise we wait for content
authorCarl Hetherington <cth@carlh.net>
Sun, 19 May 2024 21:46:55 +0000 (23:46 +0200)
committerCarl Hetherington <cth@carlh.net>
Sun, 19 May 2024 21:46:56 +0000 (23:46 +0200)
which will never arrive.

src/lib/player.cc

index 47067af5aa70bb6b60307fd75a47b80269d1cdd2..75f6b7919fd6c02fe0143e9d152917fc7f17ee41 100644 (file)
@@ -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);
                        }