From a00d4120087cbc50543ba7c91e574f066ce130c0 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 23 Aug 2017 17:43:49 +0200 Subject: [PATCH] player/Thread: initialize play_audio_format, fixes assertion This fixes an assertion failure caused by resuming playback before the decoder has finished startup. --- NEWS | 1 + src/player/Thread.cxx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 6c1ac7d82..d7801060a 100644 --- a/NEWS +++ b/NEWS @@ -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