Commit d0cd98a6 authored by Pete Beardmore's avatar Pete Beardmore Committed by Max Kellermann

MultipleOutputs: ensure input_audio_format is zero-initialised

-fixes SIGABRT when mpd is started from a previously paused state -regression introduced by commit: f5a923b9: 'OutputAll: convert to class, move instance to class Partition' -input_audio_format was previously declared using the static modifier ensuring it was zero-initialised by default -the current default-initialised input_audio_format contains garbage at runtime which allows the AudioFormat.IsDefined() 'fail fast' test in MultipleOutputs::Update to pass and the SIGABRT follows in AudioOutput::Open when passed the invalid input_audio_format struct -switching AudioFormat.IsDefined() for AudioFormat.IsValid() is an alternative workaround
parent 88eae9da
......@@ -37,6 +37,7 @@
MultipleOutputs::MultipleOutputs(MixerListener &_mixer_listener)
:mixer_listener(_mixer_listener),
input_audio_format(AudioFormat::Undefined()),
buffer(nullptr), pipe(nullptr),
elapsed_time(-1)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment