From 78a6097283437a89682914a5eab654edb6f81922 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Tue, 20 Oct 2009 14:14:00 +0000 Subject: [PATCH] Do not crash when a node tries to change the format during runtime, as long as this is actually not implemented. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33679 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/media/media-add-ons/mixer/AudioMixer.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/add-ons/media/media-add-ons/mixer/AudioMixer.cpp b/src/add-ons/media/media-add-ons/mixer/AudioMixer.cpp index 30135336ca..e4e0c7c749 100644 --- a/src/add-ons/media/media-add-ons/mixer/AudioMixer.cpp +++ b/src/add-ons/media/media-add-ons/mixer/AudioMixer.cpp @@ -475,10 +475,13 @@ AudioMixer::FormatChanged(const media_source &producer, if (fCore->Settings()->RefuseInputFormatChange()) { TRACE("AudioMixer::FormatChanged: input format change refused\n"); - return B_ERROR; + return B_NOT_ALLOWED; } - // XXX we should not apply the format change at this point + // TODO: We should not apply the format change at this point + // TODO: At the moment, this is not implemented at the moment and will just + // crash the media_server. + return B_NOT_SUPPORTED; // tell core about format change fCore->Lock();