player/Thread: initialize play_audio_format, fixes assertion

This fixes an assertion failure caused by resuming playback before the
decoder has finished startup.
This commit is contained in:
Max Kellermann 2017-08-23 17:43:49 +02:00
parent 5fb39658f1
commit a00d412008
2 changed files with 2 additions and 1 deletions

1
NEWS
View File

@ -5,6 +5,7 @@ ver 0.20.10 (not yet released)
- aiff: fix FORM chunk size endianess (is big-endian) - aiff: fix FORM chunk size endianess (is big-endian)
* mixer * mixer
- osx: add a mixer for OSX. - osx: add a mixer for OSX.
* fix crash when resuming playback before decoder is ready
* fix crash on Windows * fix crash on Windows
ver 0.20.9 (2017/06/04) ver 0.20.9 (2017/06/04)

View File

@ -135,7 +135,7 @@ class Player {
/** /**
* The current audio format for the audio outputs. * 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 * The time stamp of the chunk most recently sent to the