diff options
author | Max Kellermann <max@musicpd.org> | 2017-08-23 17:43:49 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2017-08-23 17:43:49 +0200 |
commit | a00d4120087cbc50543ba7c91e574f066ce130c0 (patch) | |
tree | 5e873b25278c614df883141113f2b279df6746d9 | |
parent | 5fb39658f17d1eafeb745a316112440944c3a507 (diff) |
player/Thread: initialize play_audio_format, fixes assertion
This fixes an assertion failure caused by resuming playback before the
decoder has finished startup.
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | src/player/Thread.cxx | 2 |
2 files changed, 2 insertions, 1 deletions
@@ -5,6 +5,7 @@ ver 0.20.10 (not yet released) - aiff: fix FORM chunk size endianess (is big-endian) * mixer - osx: add a mixer for OSX. +* fix crash when resuming playback before decoder is ready * fix crash on Windows ver 0.20.9 (2017/06/04) diff --git a/src/player/Thread.cxx b/src/player/Thread.cxx index 4cbe1653b..923e5ee59 100644 --- a/src/player/Thread.cxx +++ b/src/player/Thread.cxx @@ -135,7 +135,7 @@ class Player { /** * The current audio format for the audio outputs. */ - AudioFormat play_audio_format; + AudioFormat play_audio_format = AudioFormat::Undefined(); /** * The time stamp of the chunk most recently sent to the |