From: Richard Kettlewell Date: Sun, 31 Jul 2011 11:24:44 +0000 (+0100) Subject: playrtp: refuse to play RTP via RTP. X-Git-Tag: branchpoint-5.1~39 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/commitdiff_plain/30a821969dcd507dc7da2583fa0134492dfd82b2 playrtp: refuse to play RTP via RTP. 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. --- 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;