From d0cd98a63aa40ba16946148590d3cf0648a1dd19 Mon Sep 17 00:00:00 2001 From: Pete Beardmore Date: Sun, 9 Mar 2014 18:40:56 +0000 Subject: MultipleOutputs: ensure input_audio_format is zero-initialised -fixes SIGABRT when mpd is started from a previously paused state -regression introduced by commit: f5a923b9d16e4c63942a033d1bdb2ab150aae342: '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 --- src/output/MultipleOutputs.cxx | 1 + 1 file changed, 1 insertion(+) (limited to 'src/output') diff --git a/src/output/MultipleOutputs.cxx b/src/output/MultipleOutputs.cxx index 2791e7045..6cd2c9fa6 100644 --- a/src/output/MultipleOutputs.cxx +++ b/src/output/MultipleOutputs.cxx @@ -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) { -- cgit v1.2.3