From 30a821969dcd507dc7da2583fa0134492dfd82b2 Mon Sep 17 00:00:00 2001 Message-Id: <30a821969dcd507dc7da2583fa0134492dfd82b2.1715377412.git.mdw@distorted.org.uk> From: Mark Wooding Date: Sun, 31 Jul 2011 12:24:44 +0100 Subject: [PATCH] playrtp: refuse to play RTP via RTP. Organization: Straylight/Edgeware From: Richard Kettlewell playrtp attempting to use the RTP backend becomes the default situation if no local sound output API is available. This can happen using (e.g.) Fink's GCC 4.4, because it cannot compile Apple's header files, and so concludes that CoreAudio/AudioHardware.h is not available. This is about the minimal possible change to stop playrtp crashing in this case. There are a variety of better possible answers. --- clients/playrtp.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/clients/playrtp.c b/clients/playrtp.c index 2ab6790..2bd2452 100644 --- a/clients/playrtp.c +++ b/clients/playrtp.c @@ -678,6 +678,12 @@ int main(int argc, char **argv) { } } if(config_read(0, NULL)) disorder_fatal(0, "cannot read configuration"); + if(backend == &uaudio_rtp) { + /* This means that you have NO local sound output. This can happen if you + * use a non-Apple GCC on a Mac (because it doesn't know how to compile + * CoreAudio/AudioHardware.h). */ + disorder_fatal(0, "cannot play RTP through RTP"); + } if(!maxbuffer) maxbuffer = 2 * minbuffer; argc -= optind; -- [mdw]