$NetBSD: patch-aa,v 1.3 2003/12/23 09:52:11 simonb Exp $

--- src/decoder.c.orig	Fri May 30 21:31:35 2003
+++ src/decoder.c
@@ -260,6 +260,9 @@ decode (void *arg)
   /* main loop */
   do
     {
+#ifdef _PTH_PTHREAD_H_
+	  sched_yield();
+#endif
       if (info->stop)
         break;
       if (seek_skip)
@@ -416,6 +419,8 @@ decode (void *arg)
 #endif /* DEBUG */
 
   mad_plugin.output->close_audio ();
+  close (info->infile);
+  info->infile = 0;
   info->stop = 1;
   pthread_exit (0);
 }
